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

HeaderDescription
X-CM-ProductTokenYour product token. Retrieve from Messaging Gateway app.
Content-Typeapplication/json

Request body

{
    "id": "1e12cb10-d14a-4cd6-8d86-e5263cf122ee",
    "code": "12345"
}

Parameters

ParameterTypeDescription
idstringCode identifier.
codestringThe code received via SMS/Push or Voice.

Response

{
  "valid": true
}

πŸ“˜

Once a code has been successfully validated, it cannot be validated again.

Parameters

ParameterDescription
validIndicates if the code was valid.

Response codes

HTTP statusDescription
200Successful request.
400Invalid request, see message in the response.
500Unknown error occurred.