UpdateEventSub

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:UpdateEventSub

none

*Rtc

acs:live::{#accountId}:rtc/{#AppId}

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
  • If the Users.N parameter is not empty, this parameter is required.

  • If ChannelId is set to * or left empty, it indicates a subscription to all channels. Only one all-channel subscription is allowed per AppId.

  • A maximum of 20 subscription events can be created simultaneously per AppId.

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:

Users.1=****
Users.2=****
......

user1

Events

array

Yes

The subscription events.

string

Yes

The subscribed events. Valid values:

  • ChannelEvent: channel events.

  • UserEvent: user events in the channel.

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.