GetSmsAuthTokens

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.