v1

latestOpenAPI 3.1.02026-07-14330101.9 KB

Request and Send Code - OTP Code

GLOBAL means system will randomize the channel to send or receive the message from or to the user. This approach will need the Global Token instead of Channel Token. The Request and Send OTP Code endpoint enables you to generate a One-Time Password (OTP) with customizable validation settings to ensure uniqueness. You can easily toggle these validation features on or off, depending on your needs. Once generated, the OTP is automatically sent to the specified phone number, providing a secure and flexible way to authenticate users.

post/otp/code/global

Request body

contact_idstring required

The contact id

lengthinteger required

Length OTP Code.

useLetterboolean required

Using letter for Otp Code.

useNumberboolean required

Using number for Otp Code.

allCapitalboolean required

Using uppercase for Otp Code.

namestring required

Application Name.

expiresinteger required

Expire time in second ( e.g 30 Minute )

Response

200

successboolean
messagestring

Example response

{
  "success": true,
  "message": "OK",
  "data": {
    "id": "9cf5fda0-ffc7-4acb-aa83-52cfb9c77110",
    "code": "4807",
    "chat_id": "6281357541790@c.us",
    "message": "[Your Company Name] *4807*",
    "expired_at": "2024-09-08T14:19:21.034878Z",
    "timestamp": "2024-09-08T13:49:21.000000Z"
  }
}