Skip to main content
POST
OTP Code - Validate Code

Overview

This endpoint verifies OTPs generated by the “Request and Send OTP Code” endpoint. It allows you to validate whether the OTP code provided by a user matches the one that was sent.

Request Parameters

string
required
The contact ID that received the OTP code. Format: xxx@c.us
string
required
The OTP code to validate. Example: “123456”

Response

boolean
Indicates whether the request was successful.
string
A message describing the result of the operation.
object

Error Codes

object
Authorization Exception - Occurs when the request is not properly authorized.
object
Validation Exception - Occurs when the request parameters fail validation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
contact_id
string
required

Contact ID.

Required string length: 10 - 50
Pattern: ^[0-9]+@[cs]\.us$
Example:

"xxx@c.us"

code
string
required

OTP Code.

Required string length: 4 - 8
Pattern: ^[0-9]{4,8}$
Example:

"123456"

Response

The response is of type object.