CreateRTCWhipStreamAddress

Updated at:

Creates a WHIP ingest URL for an RTC channel.

Operation description

Usage notes

  1. Call the CreateRTCWhipStreamAddress operation to create a WHIP ingest URL for the corresponding RTC channel.

  2. Use OBS to ingest streams over the WHIP protocol.

    • Start OBS.

    • In the menu bar, choose File > Settings.

    • On the Settings page, click Stream, configure the following parameters, and then click OK.

      ParameterDescription
      ServiceSelect WHIP.
      ServerUse the WhipAddress URL generated by the operation in Step 1.
      Bearer TokenLeave the stream key empty.

  3. Other users can join the corresponding channel to watch the stream.

QPS limits

The QPS limit for a single user is 40 calls per second. If the limit is exceeded, API calls are throttled, which may affect your services. Call the operation at a reasonable frequency.

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

none

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The idempotency parameter.

Note

An identifier used to distinguish whether multiple requests are the same request. Do not specify this parameter for this operation.

58E73333-xxxx-xxxx-xxxx

AppId

string

Yes

The application ID. You can view your application IDs by choosing ApsaraVideo Live > Live+ > ApsaraVideo Real-time Communication > Application Management. If you do not have an application, you can click Create Application to create one.

6a0**6dcc-xxxx-xxxx-xxxx-e**e3exxxxxx

ChannelId

string

Yes

The ID of the channel to join.

ch00000****001

UserId

string

Yes

The user ID. The user ID must be unique among all users in the channel.

zb0000****0001

DisplayName

string

Yes

The display name of the user in the channel.

Note

Chinese and other characters are supported. To prevent the name from being too long, keep the size under 32 bytes.

Anchor Xiao Er

ExpireTime

integer

No

The validity period of the stream ingest URL. Unit: seconds. Default value: 43200.

Note

If the validity period expires, ongoing streams that use the URL generated by this operation are not affected. However, attempts to ingest streams again by using the same URL will fail.

43200

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

58E7**D4-xxxx-xxxx-xxxx-6B5**6Cxxxxx

WhipAddress

string

The WHIP ingest URL.

https://xxxxxx.media-sh.xxxxx.com/xxxxxxxxxxxx/3723a3xxxxxxxxx223c606b***5f7a2bc7c56ea5cdd0xxxxe?auth_key=17495xxxxx-xxxx-0-f013003067c78c4053f9cd0xxxxxxx&qqzr=H4sIAAAAAAAC_6pWSlayUkrOMxxxxxxrPyCxQ0lFKQTCLlKyUjM2Nj**NDQ1TEy2Mjc3xxxxxxxxxxqRYAAAD__xxxxx__xxxxxxxx

Examples

Success response

JSON format

{
  "RequestId": "58E7**D4-xxxx-xxxx-xxxx-6B5**6Cxxxxx",
  "WhipAddress": "https://xxxxxx.media-sh.xxxxx.com/xxxxxxxxxxxx/3723a3xxxxxxxxx223c606b***5f7a2bc7c56ea5cdd0xxxxe?auth_key=17495xxxxx-xxxx-0-f013003067c78c4053f9cd0xxxxxxx&qqzr=H4sIAAAAAAAC_6pWSlayUkrOMxxxxxxrPyCxQ0lFKQTCLlKyUjM2Nj**NDQ1TEy2Mjc3xxxxxxxxxxqRYAAAD__xxxxx__xxxxxxxx"
}

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.