Skip to main content

Verigator API

REST API to send one-time passwords worldwide instantly with SMS, WhatsApp, and Viber.


Overview

A dedicated service for delivering One-Time Passwords (OTPs) with the highest quality worldwide.

Verigator API schema

info

Looking to send marketing or transactional SMS messages? Use our Omnichannel API instead.


1. Enable Verigator

Verigator is currently in early access and we have to manually enable it before you can start using it.

Contact us to start using Verigator

2. Install a suitable library

The fastest way to get started with the API is to use our official libraries.

Select your preferred programming language and follow the instructions.

With PIP

To install the API client library, simply execute:

pip install messente-api

Or with Setuptools

To install the API client library, simply execute:

python setup.py install --user

then import the package:

import messente_api

Take a look at the library's GitHub and PyPI pages.

Let us know if your preferred language is not in the list

3. Send the OTP like any other SMS

Message content must match exactly the format "XXXX is your verification code".

Once you send the message as SMS then it is automatically converted to multi-channel Verigator solution.

The order of the messages are determined by Messente.

"XXXX" can be any digit between 1-10 characters long

# pip install messente-api

from pprint import pprint
from messente_api import (
OmnimessageApi,
SMS,
Omnimessage,
Configuration,
ApiClient,
OmnimessageMessagesInner,
)
from messente_api.rest import ApiException

configuration = Configuration()
configuration.username = "YOUR_MESSENTE_API_USERNAME"
configuration.password = "YOUR_MESSENTE_API_PASSWORD"

api_instance = OmnimessageApi(ApiClient(configuration))

sms = SMS(sender="<sender name (optional)>", text="1234 is your verification code")
sms_inner = OmnimessageMessagesInner(sms)

omnimessage = Omnimessage(messages=[sms_inner], to="<recipient_phone_number>")

try:
response = api_instance.send_omnimessage(omnimessage)
print(
"Successfully sent Omnimessage with id: %s that consists of the following messages:" % response.omnimessage_id
)
for message in response.messages:
pprint(message)
except ApiException as exception:
print("Exception when sending an omnimessage: %s\n" % exception)

4. Track the message delivery status

Use the IDs in the API response to track message delivery statuses.

Messente tracks your sent message and reports status updates back to you.

To be able to view the status, you must add a callback URL to the message. Messente will use this URL to make HTTP POST requests, if there is a status update.

Learn more about the delivery status

{
"messages": [
{
"channel": "viber",
"message_id": "2311234-7c23-4f7e-1234-02761e55ffdd",
"sender": "Verigator"
},
{
"channel": "whatsapp",
"message_id": "53eb1234-695f-1234-9ab0-86425e78ede0",
"sender": "Verigator"
},
{
"channel": "sms",
"message_id": "6e821234-edf2-4fe5-1234-b62062037c56",
"sender": "Verigator"
}
],
"omnimessage_id": "2f151234-e772-48fb-a66a-1234fb3f203e",
"to": "+372555666777"
}

Congratulations!

You're now ready to start sending OTPs everywhere.

Learn more about delivery reports and error codes.

Go to full API specification