All Products
Search
Document Center

ApsaraVideo Live:CreateLiveMessageApp

Last Updated:Jul 15, 2026

Creates an interactive messaging application by calling CreateLiveMessageApp.

Operation description

  • When calling other interactive messaging API operations, the data center must be the same as the one specified when creating the interactive messaging application.

  • A maximum of 300 interactive messaging applications can be created under a single Alibaba Cloud account.

QPS limit

The single-user QPS limit for this API operation is 50 calls per second. If this limit is exceeded, the API call is throttled, which may affect your business. Call this operation appropriately.

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:CreateLiveMessageApp

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppName

string

No

The application name. The name must be 2 to 16 characters in length.

testApp

AuditType

integer

No

The security audit mode. Valid values:

  • 0: default value. Security audit is disabled.

  • 1: built-in security audit.

  • 2: custom security audit.

Valid values:

  • 0 :

    security audit disabled.

  • 1 :

    built-in security audit.

  • 2 :

    custom security audit.

2

AuditUrl

string

No

The URL for custom security audit. This parameter is required when custom security audit is selected (AuditType=2). The URL must start with http:// or https://, must not contain private IP addresses, and must not include port numbers. For the format of custom security audit content, see the following section.

http://demo.aliyundoc.com/exampleaudit

EventCallbackUrl

string

No

The event callback URL for client logon, logout, join group, and leave group events. If this parameter is empty, event callbacks are disabled. For the callback API operations that are triggered, see Client access. The event callback URL must start with http:// or https://, must not contain private IP addresses, and must not include port numbers. For the event callback format and callback authentication logic, see the following section.

http://demo.aliyundoc.com/examplecallback

DataCenter

string

No

The data center. Valid values:

  • cn-shanghai: default value. Shanghai.

  • ap-southeast-1: Singapore.

Note

When calling other interactive messaging API operations, the data center must be the same as the one specified when creating the interactive messaging application.

cn-shanghai

MsgLifeCycle

integer

No

The storage duration tier for group messages within the application. Valid values:

  • 0: default value. Messages are stored for 30 days.

  • 1: messages are stored for 90 days.

  • 2: messages are stored for 180 days.

1

Custom security audit content description:

  • Request protocol: HTTP

  • Request method: POST

  • Request example:

{
  "content": "testaudit"
}
  • Response example:

{
  "pass": true,
  "reason":"****"    |pass set to true indicates the content passes the audit. Otherwise, the content does not pass. reason indicates the reason for rejection.
}
Note

An HTTP status code of 200 indicates success. A non-200 status code indicates that the service is unavailable, and the system degrades by skipping the audit for the message.

Event callback

HTTP/HTTPS POST. The body is a JSON UTF-8 string in the following format. Event callback example:

{
  "appid":"demo",
  "eves":[{
  "uid":"uid1",
  "sid":"sessionid",
  "events":[{
     "e": 3, |Event type. Enumeration. 1: logon, 2: logout, 3: joingroup, 4: leavegroup, 5: client reconnection after network disconnection
     "r": 1, |Logout reason. This attribute is not present for other events. Enumeration. 1: normal call, 3: timeout, 4: logged on from another device
     "g": "testgroup", |Group ID. This value is present for join and leave group events. This attribute is not present for logon and logout events.
     "gs":["testgroupid"] |Group ID list. When the client reconnects after network disconnection, this contains the groups the client has joined. This attribute is not present for other events.
  }]
  }]
}
Note

An HTTP status code of 200 indicates success. Other status codes indicate failure, and the system retries the delivery.

Callback authentication description

When the service initiates a request, the HTTP(S) request header includes the Ali-Live-Timestamp and Ali-Live-Signature fields for the callback message receiving server to perform signature authentication. The Ali-Live-Signature value is calculated as follows: Ali-Live-Signature=sha256(CONTENT). CONTENT = callback domain name + Ali-Live-Timestamp value + authentication key. The callback domain name is the domain name configured in the callback URL. The authentication key is the AppKey generated when the AppId was created.

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

65EEDBEB-43FE-1E15-976F-3DDD753A****

AppId

string

The application ID, which is used for subsequent operations such as joining groups.

demo

AppKey

string

The AppKey, which is used to generate authentication for various operations related to the AppId.

**********************************

AppSign

string

The application signature. The interactive messaging service SDK requires this information.

**************************************************************************

DataCenter

string

The data center.

cn-shanghai

Examples

Success response

JSON format

{
  "RequestId": "65EEDBEB-43FE-1E15-976F-3DDD753A****",
  "AppId": "demo",
  "AppKey": "**********************************",
  "AppSign": "**************************************************************************",
  "DataCenter": "cn-shanghai"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InputInvalid %s. Illegal input parameters
400 ErrorInvalidAppName %s. The AppName is invalid, please check and try again.
400 ErrorTooManyApps %s. Under each account, up to 300 apps are allowed to be created at the same time.
400 ErrorInvalidEventCallbackUrl %s. The EventCallbackUrl is invalid, please check and try again.
400 ErrorInvalidAuditUrl %s. The AuditUrl 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.