All Products
Search
Document Center

ApsaraVideo Live:CreateRoomRealTimeStreamAddress

Last Updated:Jul 15, 2026

Creates an ingest URL for an RTMP stream in a channel.

Operation description

  1. Call this operation to generate an RTMP ingest URL.

  2. Ingest a stream to the RTMP URL. Other users in the channel can view this stream.

  3. Stop stream ingest. Other users in the channel see the RTMP stream user leave the channel.

Note
  • You can repeat steps 2 and 3 while the RTMP URL is valid.

  • Call DescribeChannelParticipants to query the channel user list and periodically check whether the RTMP stream user is still in the channel. If the user is no longer in the channel, stream ingest may have been interrupted. Stop stream ingest and go back to step 2 to re-ingest.

Before you begin

When using ApsaraVideo Real-time Communication, you typically join a channel and ingest RTC streams through the Alibaba Cloud ARTC SDK. However, in certain special scenarios, Alibaba Cloud allows you to use the RTMP protocol for stream ingest (such as OBS stream ingest). Alibaba Cloud then converts the RTMP stream to an RTC stream for distribution and user joining. You can use this operation to implement this capability. This operation generates an RTMP ingest URL. After you complete stream ingest, Alibaba Cloud automatically converts the stream to an RTC stream. If your business is a pure live streaming scenario, do not use this operation. Refer to Generate ingest URLs and streaming URLs to quickly implement RTMP stream ingest and live playback.

Rate limit

The single-user queries per second (QPS) limit for this operation is 100. If the limit is exceeded, API calls are 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:CreateRoomRealTimeStreamAddress

none

*Rtc

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

None None

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The ID of the ApsaraVideo Real-time Communication application. Only a single ID is supported. The value can contain uppercase and lowercase letters, digits, underscores, and hyphens (-), with a maximum of 64 characters. You can view your application IDs by navigating to ApsaraVideo Live > Live+ > Real-time Communication > Application Management. If no application exists, create one by clicking Create Application.

yourAppId

ChannelId

string

Yes

The ID of the channel to join. Only a single ID is supported. The value can contain uppercase and lowercase letters, digits, underscores, and hyphens (-), with a maximum of 64 characters.

yourChannelId

UserId

string

Yes

The user ID for the RTMP stream ingest. This value must not duplicate any other user ID in the channel. The value can contain uppercase and lowercase letters, digits, underscores, and hyphens (-), with a maximum of 64 characters.

rtmp-uuid

DisplayName

string

Yes

The display name of the RTMP stream in the channel. Maximum length: 40 characters.

rtmp-dname

ExpireTime

integer

No

The validity period of the RTMP URL. Unit: seconds. Default value: 36000 (10 hours).

43200

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

F8DB7E25-6A35-161A-AA41-B7A658AF****

RtmpAddress

string

The RTMP ingest URL.

rtmp://rtcpush****.rtmp.alivecdn.com/rtcdev****/H4sIAAAA****_6pWSlayUipJLS5R0lEqRTBTEMwiJSul1CRTMxNjsyQTM****-PUZCMz8yTDZLNkAwMDA6M0I0ulWgA****__wEAAP__a_e7YkkAAAA?auth_key=1700492701-6e33-0-c6d7e3a93dc2dbe3af42f6259ccd****

Examples

Success response

JSON format

{
  "RequestId": "F8DB7E25-6A35-161A-AA41-B7A658AF****",
  "RtmpAddress": "rtmp://rtcpush****.rtmp.alivecdn.com/rtcdev****/H4sIAAAA****_6pWSlayUipJLS5R0lEqRTBTEMwiJSul1CRTMxNjsyQTM****-PUZCMz8yTDZLNkAwMDA6M0I0ulWgA****__wEAAP__a_e7YkkAAAA?auth_key=1700492701-6e33-0-c6d7e3a93dc2dbe3af42f6259ccd****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InputInvalid %s. Illegal input parameters
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.