UpdateEventSub
Updates the callback for subscribing to channel messages.
Operation description
Before calling this operation, you must call CreateEventSub to create a callback for subscribing to channel messages.
If a channel is already associated, the original rules still apply. The new rules take effect only when the channel is reopened after being closed for more than 20 minutes.
If you want to update only specific fields, you must populate the other fields with their original values.
QPS limits
The queries per second (QPS) limit per user is 50. If the limit is exceeded, API calls are throttled, which may affect your services. Call this operation at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:UpdateEventSub |
none |
*Rtc
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The ID of the application for the subscription. |
9qb1**** |
| SubscribeId |
string |
Yes |
The subscribe event ID. You can obtain the subscribe ID through the response parameter query of the CreateEventSub operation. |
ad53276431c**** |
| ChannelId |
string |
No |
The ID of the subscribed channel. You can query the subscribed channel ID by calling the ListEventSub operation. Note
|
123333 |
| Users |
array |
No |
The users whose messages are subscribed to. |
|
|
string |
No |
The users whose messages are subscribed to. If this parameter is left empty, messages from all users in the channel (including streamers and viewers) are subscribed to. The format is as follows: |
user1 |
|
| Events |
array |
Yes |
The subscription events. |
|
|
string |
Yes |
The subscribed events. Valid values:
|
ChannelEvent |
|
| CallbackUrl |
string |
Yes |
The callback URL. For security reasons, the callback URL must be a domain name that uses a standard port. The callback URL cannot contain a port number. Example: http(s)://xxxx.com/xxxx. For more information about the callback content, see CallBack. |
http://****.com/callback |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
AE050E24-BE9B-1E79-BB30-7EA0BBAE7F08 |
Examples
Success response
JSON format
{
"RequestId": "AE050E24-BE9B-1E79-BB30-7EA0BBAE7F08"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InputInvalid | %s. | Illegal input parameters |
| 400 | QuotaLimitError | %s. | For each AppId, a maximum of 20 subscriptions are allowed at the same time, and only one full channel subscription is allowed. |
| 400 | ErrorInvalidCallBackUrl | %s. | The CallBackURL is invalid, please check and try again. |
| 500 | ServerError | %s. | Unknown error, please try again later or submit a ticket for consultation. |
| 403 | NoAuth | %s. | No permission |
| 404 | ResourceNotExist | %s. | The requested resource does not exist, please check and try again |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.