Generate and Send an OTP

Encoding : UTF-8

Authentication

Your "api-key" and "api-login" identifiers must be added in the headers.

Definition

This web service allows you to generate and send an OTP code.

Special parameters

NameTypeDescription
phone_numberstringFirst name to be associated with the sub-account.
textstringMessage text (from 1 to 1224 characters).
channelstringChannel name [‘sms‘, ‘voice_sms‘].
senderstringSender of the message (if the user allows it), 3-11 alphanumeric characters (a-zA-Z0-9).
code_lengthintegerThis value is the code length.
allow_digitsbooleanThis value is "true" when you want to allow digits.
allow_upper_casebooleanThis value is "true" when you want to allow upper case.
allow_lower_casebooleanThis value is "true" when you want to allow lower case.
allow_special_charsbooleanThis value is "true" when you want to allow special characters.
validity_periodintegerThis value is the validity period.
max_wrong_attemptsintegerThis value is the maximum wrong attempts.
recipient_ipstringThis value is the IP recipient.
voice_languagestringVoice Language [‘en-US’, ‘en-GB’, ‘el-GR’, ‘pl-PL’, ‘hu-HU’, ‘sv-SE’, ‘de-DE’, ‘es-ES’, ‘es-LA’, ‘fr-FR’, ‘it-IT’, ‘pt-BR’, ‘ru-RU’].
voice_genderstringVoice gender [‘male’, ‘female’].

How Our API Deals With Incorrect Data

The API we provide will try to interpret your request as best it can. If a parameter has the wrong value, we will try to understand it anyway. If the parameter has the wrong type, we will try to format it as best we can. Thus, we have determined default values, which are indicated in our documentation. If a parameter could not be recognized or "fixed", we will ignore it, but your request will be sent.
If one of your parameters does not have the right value, or does not have the right type, we will try to:

  • "cast" (convert) it so that it can be understood.
  • format it (delete prohibited characters for example)

Server Response Example in JSON

Success

{
  "code": 0,
  "message": "*****",
  "ticket_number": "*****",
  "otp_request_token": "******"
}
Language
Click Try It! to start a request and see the response here!