Creates an access warrant.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
aicontent:CreateAccessWarrant |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/aliyunConsole/createAccessWarrant HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
WarrantCreateCmd |
|
| appId |
string |
No |
The merchant's application ID. |
a123 |
| timestamp |
string |
No |
The 10-digit request timestamp in seconds. |
1701000000 |
| userId |
string |
No |
The merchant's user ID. |
sn123 |
| userClientIp |
string |
No |
The public IP address of the client device. |
110.25.23.12 |
| requestSign |
string |
No |
The signature for the request parameters. |
e32fac43df0b0b0be32fac43df0b0b0b |
| warrantAvailable |
integer |
No |
The duration, in seconds, for which the access warrant is valid. |
7200 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
SingleResponse |
{ "success": true, "data":{ "appId": "a123", "userId": "u456", "accessToken": "abc123def456ghi789jkl012mno345pqr678stu901vwx2yz345fgh67i", "warrantId": "warrant_123456", "expireTime": "2024-01-01T12:00:00Z" }, "requestId": "592A27EF-26D3-1434-98C1-97AD63337852" } |
|
| requestId |
string |
The unique request ID. |
xxxx-xxxx-xxxx-xxxxxxxx |
| success |
boolean |
Indicates whether the request was successful. |
true |
| errCode |
string |
The error code returned if the request fails. |
UNKNOWN_ERROR |
| errMessage |
string |
The error message returned if the request fails. |
未知错误 |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| data |
object |
The returned data object. |
[] |
| ApplicationAccessId |
string |
The merchant's application ID. |
1234567890 |
| UserId |
string |
The merchant's user ID. |
1234567890 |
| AccessToken |
string |
The access token. |
1234567890 |
| AccessWarrantId |
string |
The access warrant ID. |
ex2xxxxxxxx |
| ExpireTime |
string |
The expiration time of the access warrant. |
1672531200 |
| CreateTime |
string |
The creation time of the access warrant. |
1672531200 |
Examples
Success response
JSON format
{
"requestId": "xxxx-xxxx-xxxx-xxxxxxxx",
"success": true,
"errCode": "UNKNOWN_ERROR",
"errMessage": "未知错误",
"httpStatusCode": 200,
"data": {
"ApplicationAccessId": "1234567890",
"UserId": "1234567890",
"AccessToken": "1234567890",
"AccessWarrantId": "ex2xxxxxxxx",
"ExpireTime": "1672531200",
"CreateTime": "1672531200"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.