POST https://api.cm.com/otp/v2/otp/{id}/verify
Header | Description |
---|
X-CM-ProductToken | Your product token. Retrieve from Messaging Gateway app. |
Content-Type | application/json |
Parameter | Type | Description |
---|
id | string | The identifier for the OTP, returned in the response after creating the OTP. |
Parameter | Type | Description |
---|
code | string | The code received via the specified channel. |
{
"id": "1e12cb10-d14a-4cd6-8d86-e5263cf122ee",
"channel": "sms",
"verified": true,
"createdAt": "2022-01-01T13:00:00+0000",
"expiresAt": "2022-01-01T13:01:00+0000"
}
📘
Once a code has been successfully validated, it cannot be validated again.
Parameter | Description |
---|
id | The identifier of the OTP. |
channel | The channel used to send the code. |
verified | Indicates if the code was valid. |
createdAt | The date the OTP was created. |
expiresAt | The date the OTP will expire. |