Send a Viber Verification Message (OTP)

After authentication, you can make a request to the Viber OTP endpoint to send an OTP.

RESPONSE PARAMETERS

KEYDESCRIPTION
trackingIdA unique tracking identifier for the OTP request. Used for logging and tracking.
toThe recipient’s phone number, confirming who the OTP was sent to.
fromThe sender's name or identifier.
countryThe country code or name of the recipient’s country.
statusThe status of the OTP request, containing:
status.statusThe current status of the OTP, e.g., "QUEUED" (waiting to be sent).
status.dateThe timestamp when the status was updated.
applicationNameThe name of the application sending the OTP.
directionThe direction of the message, typically "Outbound".
ttlTime-to-live in seconds for the OTP message, matching the value provided in the request.
seqThe sequence number, matching the value provided in the request.
labelThe label or type of the message, such as "transactional", confirming the purpose of the OTP.
typeThe type of OTP message, such as "PRIMARY_ONLY", confirming the message type.
templateIdThe template ID used for the OTP message, matching the template in the request.
templateParamsThe parameters used in the template, such as the OTP pin.
templateParams.pinThe PIN number
templateLangThe language used in the template, confirming the language of the OTP message.

ERROR CODES

STATUSDESCRIPTION
401Invalid or expired access token..
403Access to the resource is denied.
404The sender information was not found.
Language