Call this API to verify phone numbers on H5 pages and retrieve the verification result when the operation completes.
Operation description
Preparations
Review the billing methods and pricing for the Phone Number Verification Service before you use this API.
Create an Alibaba Cloud account, obtain an AccessKey, and configure a verification scheme. For more information, see H5 Phone Number Verification Process.
QPS limit
This API supports up to 1,000 queries per second (QPS) per user. If you exceed this limit, rate limiting is applied to your API calls, which may impact your business operations. Plan your API usage accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dypns:VerifyPhoneWithToken |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PhoneNumber |
string |
Yes |
The phone number to verify. |
1380000**** |
| SpToken |
string |
Yes |
The phone number verification token obtained from the JSSDK. The validity period and usage count of the token vary by carrier:
|
Dfafdafad542**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code.
|
OK |
| Message |
string |
The description of the status code. |
请求成功 |
| RequestId |
string |
The request ID. |
8906582E-6722 |
| GateVerify |
object |
A structure. |
|
| VerifyResult |
string |
The verification result. Valid values:
|
PASS |
| VerifyId |
string |
The serial number of the verification. |
12134**** |
Examples
Success response
JSON format
{
"Code": "OK",
"Message": "请求成功",
"RequestId": "8906582E-6722",
"GateVerify": {
"VerifyResult": "PASS",
"VerifyId": "12134****"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | RamPermissionDeny | The user is not authorized to operate on the specified resource. | |
| 400 | UnknowError | The requested service is not available now, please try again later. | |
| 400 | Unsupported.Account | Your account has not activated the product. | Your account not be opened the product. |
| 400 | MobileNumberIllgeal | The specified mobile phone number is invalid. | |
| 400 | InvalidToken | The token is invalid. | |
| 400 | VerifySchemeNotExist | The specified verify scheme already exists. | |
| 500 | SystemError | A system error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.