GetSmsAuthTokens

更新时间:
复制 MD 格式

This operation is offline.

Operation description

Preparations

Before you use this operation, register an Alibaba Cloud account, obtain an AccessKey pair, and create an authentication flow. For more information, see SMS authentication workflow.

QPS limit

The per-user QPS limit for this operation is 5000 calls per second. Exceeding this limit triggers rate limiting, which may affect your business. Call this operation only as needed.

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

Package name. Required when OsType is Android.

com.aliqin.mytel.test

SignName

string

No

Signature. Required when OsType is Android.

47fcc6615485e83b4100433****

SceneCode

string

Yes

Authentication flow ID.

FC100000134840112

OsType

string

Yes

Operating system type. Valid values: Android or iOS.

Android

BundleId

string

No

iOS bundle ID. Required when OsType is iOS.

12345****

Expire

integer

Yes

Token time-to-live (TTL), in seconds. Minimum value: 900. Maximum value: 43200.

900

SmsTemplateCode

string

Yes

SMS template code.

SMS_13987****

SmsCodeExpire

integer

No

SMS verification code TTL, in seconds. Default value: 180.

60

Response elements

Element

Type

Description

Example

object

Code

string

Request status code.

OK

Message

string

Description of the status code.

请求成功

RequestId

string

Request ID.

8906582E-6722

Data

object

Struct.

BizToken

string

Business token.

FZSMeRbLCiapIBo65NXNHvGbkGDmhs23XWTZDOtZN0g5n/kqSc2FU27Gc9YhGb6dNn9/L9ZXSYiIB6C6LMLQJjyXjRzt5v6pzZXqnjO4cSuPWYUxJvdc8l8OpucEYe8Mx17HxsHDzj0VC4D5+atcrTpJE6jQ7e2QVNjZIPMwsfxELjQS7c****

StsAccessKeySecret

string

AccessKey secret.

VboZ4xbZ****

StsAccessKeyId

string

AccessKey ID.

STS.NSqC****

ExpireTime

integer

Expiration time, expressed as a UNIX timestamp.

1631526326000

StsToken

string

Security token.

CAISiQJ1q6Ft5B2yfSjIr5DEDP/BurtW9PemMEfBrEpsOr5K17XjuDz2IHtLfXFsBusYt/U2nWpX5v4clrxIToR7SFbFY9pb6ZhazBisebDGv8HtR3TcFEjiSwapEBfe8JL4QYeQFaHwGJqEb1TDiVUAo9/TfimjWFqIKICAjYUdAP0cQgi/a0gtZr4UXHwAzvUXLnzML/2gHwf3i27LdipStxF7lHl05NbUoKTeyGKH3AGqlLVF9tite8f9NpczBvolDYfpht4RX7HazStd5yJN8KpLl6Fe8V/FxIrGXAAJv0rdbbOFq4Q1c18hOLJHAKtfsvXmlPNpsevfmpnsx****

Examples

Success response

JSON format

{
  "Code": "OK",
  "Message": "请求成功",
  "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.