GetSmsAuthTokens
This API operation is offline.
Operation description
Preparations
Complete Alibaba Cloud account registration, obtain Alibaba Cloud access credentials, and create an authentication scheme. For more information, see SMS authentication workflow.
QPS limits
The QPS limit for a single user is 5,000 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dypns:GetSmsAuthTokens |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PackageName |
string |
No |
The package name. Required when OsType is set to Android. |
com.aliqin.mytel.test |
| SignName |
string |
No |
The signature. Required when OsType is set to Android. |
47fcc6615485e83b4100433**** |
| SceneCode |
string |
Yes |
The scheme code. |
FC100000134840112 |
| OsType |
string |
Yes |
The operating system type. Valid values: Android and iOS. |
Android |
| BundleId |
string |
No |
The iOS application ID. Required when OsType is set to iOS. |
12345**** |
| Expire |
integer |
Yes |
The validity period of the token, in seconds. Minimum value: 900. Maximum value: 43200. |
900 |
| SmsTemplateCode |
string |
Yes |
The SMS template code. |
SMS_13987**** |
| SmsCodeExpire |
integer |
No |
The validity period of the SMS verification code, in seconds. Default value: 180. |
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The request status code.
|
OK |
| Message |
string |
The description of the status code. |
Request succeeded |
| RequestId |
string |
The request ID. |
8906582E-6722 |
| Data |
object |
The struct. |
|
| BizToken |
string |
The business token. |
FZSMeRbLCiapIBo65NXNHvGbkGDmhs23XWTZDOtZN0g5n/kqSc2FU27Gc9YhGb6dNn9/L9ZXSYiIB6C6LMLQJjyXjRzt5v6pzZXqnjO4cSuPWYUxJvdc8l8OpucEYe8Mx17HxsHDzj0VC4D5+atcrTpJE6jQ7e2QVNjZIPMwsfxELjQS7c**** |
| StsAccessKeySecret |
string |
The access key secret. |
VboZ4xbZ**** |
| StsAccessKeyId |
string |
The access key ID. |
STS.NSqC**** |
| ExpireTime |
integer |
The expiration time. The value is a timestamp. |
1631526326000 |
| StsToken |
string |
The security token. |
CAISiQJ1q6Ft5B2yfSjIr5DEDP/BurtW9PemMEfBrEpsOr5K17XjuDz2IHtLfXFsBusYt/U2nWpX5v4clrxIToR7SFbFY9pb6ZhazBisebDGv8HtR3TcFEjiSwapEBfe8JL4QYeQFaHwGJqEb1TDiVUAo9/TfimjWFqIKICAjYUdAP0cQgi/a0gtZr4UXHwAzvUXLnzML/2gHwf3i27LdipStxF7lHl05NbUoKTeyGKH3AGqlLVF9tite8f9NpczBvolDYfpht4RX7HazStd5yJN8KpLl6Fe8V/FxIrGXAAJv0rdbbOFq4Q1c18hOLJHAKtfsvXmlPNpsevfmpnsx**** |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "Request succeeded",
"RequestId": "8906582E-6722",
"Data": {
"BizToken": "FZSMeRbLCiapIBo65NXNHvGbkGDmhs23XWTZDOtZN0g5n/kqSc2FU27Gc9YhGb6dNn9/L9ZXSYiIB6C6LMLQJjyXjRzt5v6pzZXqnjO4cSuPWYUxJvdc8l8OpucEYe8Mx17HxsHDzj0VC4D5+atcrTpJE6jQ7e2QVNjZIPMwsfxELjQS7c****",
"StsAccessKeySecret": "VboZ4xbZ****",
"StsAccessKeyId": "STS.NSqC****",
"ExpireTime": 1631526326000,
"StsToken": "CAISiQJ1q6Ft5B2yfSjIr5DEDP/BurtW9PemMEfBrEpsOr5K17XjuDz2IHtLfXFsBusYt/U2nWpX5v4clrxIToR7SFbFY9pb6ZhazBisebDGv8HtR3TcFEjiSwapEBfe8JL4QYeQFaHwGJqEb1TDiVUAo9/TfimjWFqIKICAjYUdAP0cQgi/a0gtZr4UXHwAzvUXLnzML/2gHwf3i27LdipStxF7lHl05NbUoKTeyGKH3AGqlLVF9tite8f9NpczBvolDYfpht4RX7HazStd5yJN8KpLl6Fe8V/FxIrGXAAJv0rdbbOFq4Q1c18hOLJHAKtfsvXmlPNpsevfmpnsx****"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | SmsSignNameNotExist | The specified sms signName is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.