CheckSmsVerifyCode

Updated at:

Verifies an SMS verification code and returns the verification result.

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:CheckSmsVerifyCode

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SchemeName

string

No

The scheme name. If you do not specify this parameter, the default value "Default Scheme" is used. The value can be up to 20 characters in length.

Important If the scheme name specified in the send API is not empty, ensure that this parameter is not empty and matches the scheme name in the send API.

Test scheme

CountryCode

string

No

The country code of the phone number. Default value: 86.

86

PhoneNumber

string

Yes

The phone number.

186****0000

OutId

string

No

The external serial number.

12123231

VerifyCode

string

Yes

The verification code.

Note
  • The TemplateParam field of the SendSmsVerifyCode API can be configured in two ways:

    • {"code":"##code##","min":"5"}

    • {"code":"123456","min":"5"}

  • {"code":"##code##","min":"5"}: The verification code is dynamically generated by the API, and the Alibaba Cloud API can complete the verification.

  • {"code":"123456","min":"5"}: The verification code is configured by the user and is not dynamically generated by the API. The Alibaba Cloud API cannot verify it.

  • Pass the corresponding verification code based on your actual situation.

1231

CaseAuthPolicy

integer

No

The case sensitivity policy for verifying the verification code. Valid values:

  • 1: Case-insensitive.

  • 2: Case-sensitive.

1

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

The details of the access denial.

None

Message

string

The description of the status code.

Success

Model

object

The request result data.

OutId

string

The external serial number.

1212312

VerifyResult

string

The SMS verification code verification result. Valid values:

  • PASS: The SMS verification code verification succeeded.

  • UNKNOWN: The SMS verification code verification failed.

PASS

Code

string

The status code of the API request.

  • A value of OK indicates that the request succeeded.

  • For other error codes, see Return codes.

    Important A successful API request does not mean that the SMS verification code verification succeeded. The verification result is subject only to the return value of the Model.VerifyResult parameter.

OK

Success

boolean

Indicates whether the API call succeeded. Valid values:

  • true: The API call succeeded.

  • false: The API call failed.

    Important A successful API call does not mean that the SMS verification code verification succeeded. The verification result is subject only to the return value of the Model.VerifyResult parameter.

true

RequestId

string

The request ID.

CF8854E5-DB21-3E5D-A9B1-DDC752FD7384

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "None",
  "Message": "Success",
  "Model": {
    "OutId": "1212312",
    "VerifyResult": "PASS"
  },
  "Code": "OK",
  "Success": true,
  "RequestId": "CF8854E5-DB21-3E5D-A9B1-DDC752FD7384"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.