Domain name for API request: iss.intl.tencentcloudapi.com.
Used to set push/pull stream authentication configuration.
A maximum of 5 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: AddStreamAuth. |
| Version | Yes | String | Common Params. The value used for this API: 2023-05-17. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| Id | Yes | String | Authentication configuration ID (uuid). |
| PullState | Yes | Integer | Whether to enable playback authentication (1: enable, 0: disable) |
| PullSecret | Yes | String | Playback key (only alphanumeric characters are supported, with a length of 0-10 characters) |
| PullExpired | Yes | Integer | Playback expiration time (unit: minute) |
| PushState | Yes | Integer | Whether to enable stream authentication (1: enable, 0: disable) |
| PushSecret | Yes | String | Stream key (alphanumeric only, length 0-10 characters) |
| PushExpired | Yes | Integer | Push expiration time (unit: minute) |
| Parameter Name | Type | Description |
|---|---|---|
| Data | AddStreamAuthData | data for setting push/pull stream authentication |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: iss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddStreamAuth
<Common request parameters>
{
"Id": "12345678-abcd-efgh-ijkl-1234567890abcd",
"PullState": 0,
"PullSecret": "a3f9ub8hgj",
"PullExpired": 10,
"PushState": 0,
"PushSecret": "a3f9ub8hgj",
"PushExpired": 10
}
{
"Response": {
"Data": {
"AppId": 1300000000,
"Id": "12345678-abcd-efgh-ijkl-1234567890abcd",
"PullExpired": 10,
"PullSecret": "a3f9ub8hgj",
"PullState": 0,
"PushExpired": 10,
"PushSecret": "a3f9ub8hgj",
"PushState": 0
},
"RequestId": "b824ee63-1b76-4d6f-a97b-d26e4c3f4e30"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed |
| InvalidParameter | Invalid input parameter |
| InvalidParameterValue.InvalidPullState | Invalid pull authentication switch value |
| InvalidParameterValue.InvalidPushState | Invalid push authentication switch value |
| InvalidParameterValue.InvalidSecret | Invalid secret key value. The length or content does not conform to rules. |
| ResourceNotFound | Resource does not exist. |
文档反馈