Request OTP

The Request Token request creates an OTP object and sends its token to a specified phone number.

The request accepts a recipient's phone number as a JSON encoded body. It sends the token to the provided recipient number and returns an OTP object containing a unique transaction ID. The transaction ID can be used to make other requests concerning the OTP.

post
Request OTP

https://api.simpu.co/otp/request_token
Request
Response
Request
Headers
Authorization
required
string
Simpu API key to authenticate request
Body Parameters
recipient
required
string
Recipient phone number recipient should be the international format e.g 2348012345678
channel
optional
string
The route to send the token through Options: sms, whatsApp Default: sms
expires_in
optional
number
Specifies how many minute(s) you want the token to be valid for. value should be between 1 and 60
length
optional
number
Specifies the number of digits in the token value should be between 4 and 8
Response
200: OK
{
"status": 200,
"type": "success",
"message": "Successful",
"data": {
"verify": {
"transaction_id": "55e6fefb965c11eba1bb86d35ec4f76b",
"recipient": 2348012345678,
"reference": "sent",
"created_datetime": "2021-04-05T22:14:48",
"valid_until": "2021-04-05T22:29:48"
}
}
}

‚Äč