Generating a Signed URL
Function
This API is used to generate a signed URL.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/auth/chain
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| keychain | Array of strings | Definition Generated signed URLs. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
POST /v1/{project_id}/auth/chain
{
"domain" : "string",
"domain_type" : "string",
"stream" : "string",
"app" : "string",
"check_level" : 0,
"start_time" : "string"
} Example Responses
Status code: 200
Signed URL obtained.
{
"keychain" : [ "http://pull.domain.com/live/stream.flv?secret=xxx&time=ttt", "rtmp://pull.domain.com/live/stream?secret=xxx&time=ttt" ]
} Status code: 400
Obtain the signed URL failed.
{
"error_code" : "LIVE.100011001",
"error_msg" : "Parameter verification failed."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Signed URL obtained. |
| 400 | Obtain the signed URL failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.