Verify OTP Code
GET
/v2/otp-global/verify
const url = 'https://api.contacta.mx/v2/otp-global/verify?phone=528100001234&code=123456';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.contacta.mx/v2/otp-global/verify?phone=528100001234&code=123456' \ --header 'Authorization: Basic <credentials>'Verifies an OTP code previously sent to a mobile number.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”phone
required
string
Example
528100001234E.164 destination phone number without + (11–15 digits including country code)
code
required
string
Example
123456OTP code to verify
Responses
Section titled “Responses”SMS sent successfully
Media typeapplication/json
object
status
boolean
error
boolean
description
object
added_on
string format: date-time
charge
number format: float
country
object
country
string
iso_code
string
type
string
encoding
string
id
integer
job_id
string
length
integer
message
string
number
string
segments
integer
sender
string
Example
{ "status": true, "error": false, "description": { "added_on": "2023-09-20 16:47:15", "charge": 0.99, "country": { "country": "MEXICO", "iso_code": "MX", "type": "MOVIL" }, "encoding": "gsm", "id": 199999, "job_id": "199999", "length": 12, "message": "Hello World!", "number": "8100001234", "segments": 1, "sender": "AWESOMEINC" }}Missing required parameters
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Missing params, please verify or contact to support"}Your key auth is not valid
Media typeapplication/json
Example
{ "status": false, "error": true, "description": "Your key auth is not valid, please check with your administrator to get the new key"}
