Generating a Signed URL
Function
Generates a signed URL.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain |
Yes |
String |
Ingest or streaming domain name. |
|
domain_type |
Yes |
String |
Domain name type. |
|
stream |
Yes |
String |
Stream name, which is the same as the StreamName in an ingest or streaming URL. |
|
app |
Yes |
String |
Application name, which is the same as the AppName in an ingest or streaming URL. |
|
check_level |
No |
Integer |
Signing method C is mandatory. Check level. The value of LiveID consists of AppName and StreamName, that is, <app_name>/<stream_name>. The options are as follows:
|
|
start_time |
No |
String |
Start time of the valid access time defined by the user, for example, 2006-01-02T15:04:05Z07:00. If this parameter is not specified or is left empty, the current time is used. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
keychain |
Array of strings |
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.