Number Verification API
Last updated:2022-10-27
Number Verification API
Feature Description
Submit a mobile number and token to verify whether they are consistent.
Request URL
For Android, Harmony, and iOS
POST https://api.verification.jpush.cn/v1/web/verify
For Web
POST https://api.verification.jpush.cn/v1/web/h5/verify
Request Authentication
For details, see Authentication Method in the REST API Overview.
Request Example
Using POST https://api.verification.jpush.cn/v1/web/verify as an example:
curl --insecure -X POST -v https://api.verification.jpush.cn/v1/web/verify -H "Content-Type: application/json" -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" -d '{
"token": "STsid0000001542695429579Ob28vB7b0cYTI9w0GGZrv8ujUu05qZvw",
"phone": 15813554612,
"exID": "1234566"
}'
curl --insecure -X POST -v https://api.verification.jpush.cn/v1/web/verify -H "Content-Type: application/json" -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" -d '{
"token": "STsid0000001542695429579Ob28vB7b0cYTI9w0GGZrv8ujUu05qZvw",
"phone": 15813554612,
"exID": "1234566"
}'
This code block is shown in the floating window
Request Parameters
| Keyword | Type | Required | Description |
|---|---|---|---|
| token | String | Required | Token issued by the carrier |
| phone | String | Required | Mobile number to be verified |
| exID | String | Optional | Developer-defined ID |
Response Example
Request succeeded
{
"id": 117270465679982592,
"code": 9000,
"content": "verify consistent",
"exID": "1234566"
}
{
"id": 117270465679982592,
"code": 9000,
"content": "verify consistent",
"exID": "1234566"
}
This code block is shown in the floating window
Request failed
{
"code": 9011,
"content": "auth failed"
}
{
"code": 9011,
"content": "auth failed"
}
This code block is shown in the floating window
Response Parameters
| Keyword | Type | Description |
|---|---|---|
| id | Long | Serial number. It may be empty when a request error occurs. |
| exID | String | Developer-defined ID. If it is empty in the request, it is returned empty. |
| code | Integer | Response code |
| content | String | Response code description |
Was this document helpful?