Verify code
A new version of the OTP API is available. This version includes email and WhatsApp as channels. Please consider upgrading. A subscription is required for this version. Please contact your account manager or our sales team.
Request
POST https://api.cm.com/v1.0/otp/verify
HTTP headers
| Header | Description |
|---|---|
| X-CM-ProductToken | Your product token. Retrieve from Messaging Gateway app. |
| Content-Type | application/json |
Request body
{
"id": "1e12cb10-d14a-4cd6-8d86-e5263cf122ee",
"code": "12345"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Code identifier. |
| code | string | The code received via SMS/Push or Voice. |
Response
{
"valid": true
}
Once a code has been successfully validated, it cannot be validated again.
Parameters
| Parameter | Description |
|---|---|
| valid | Indicates if the code was valid. |
Response codes
| HTTP status | Description |
|---|---|
| 200 | Successful request. |
| 400 | Invalid request, see message in the response. |
| 500 | Unknown error occurred. |
Updated about 1 year ago
Did this page help you?