Report the received verification code to verify it, using the identity of the user (in most cases, the phone number). For an SMS verification or Phone Call verification, this is the OTP code. For FlashCall, this is the CLI.
For type number use a E.164-compatible phone number.
- https://verification.api.sinch.comhttps://verification.api.sinch.com/verification/v1/verifications/number/{endpoint}
curl -i -X PUT \
-u '<username>:<password>' \
'https://verification.api.sinch.com/verification/v1/verifications/number/{endpoint}' \
-H 'Content-Type: application/json' \
-d '{
"method": "sms",
"sms": {
"code": "123"
}
}'A success response, or an Error.
The type of the verification.
| Enum Value | Description |
|---|---|
| sms | Verification by SMS message with an OTP code. |
| flashcall | Verification by placing a flashVerificationResultEvent call (missed call) and detecting the incoming calling number (CLI). |
| callout | Verification by placing a PSTN call to the user's phone and playing an announcement, asking the user to press a particular digit to verify the phone number. |
Verification by WhatsApp message with an OTP code. |
The status of the verification
| Enum Value | Description |
|---|---|
| PENDING | The verification is ongoing. |
| SUCCESSFUL | The verification was successful. |
| FAIL | The verification attempt was made, but the number wasn't verified. |
| DENIED | The verification attempt was denied by Sinch or your backend. |
| ABORTED | The verification attempt was aborted by requesting a new verification. |
| ERROR | The verification couldn't be completed due to a network error or the number being unreachable. |
Displays the reason why a verification has FAILED, was DENIED, or was ABORTED.
| Enum Value | Description |
|---|---|
| Fraud | Fraudulent activity. |
| Not enough credit | Not enough credit in dashboard account. |
| Blocked | Blocked number. |
| Denied by callback | Callback response denied the verification. |
| Invalid callback | Callback was invalid. |
| Internal error | Internal server error. |
| Destination denied | Verification destination denied. |
| Network error or number unreachable | Network error or destination number is otherwise unreachable. |
| Failed pending | Pending failure. |
| SMS delivery failure | Could not deliver SMS. |
| Invalid CLI | CLI is invalid. |
| Invalid code | Input code is invalid. |
| Expired | Verification request has expired. |
| Hung up without entering valid code | Phone call ended without entering code. |
{ "id": "1234567890", "method": "sms", "status": "PENDING", "reason": "Expired", "callComplete": true }