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": "******"
}
Body Params

OTP Request

string
length ≥ 7
string
string
string
enum
Allowed:
string
integer
4 to 32
boolean
boolean
boolean
boolean
boolean
integer
3 to 10000000
integer
string
string
enum
string
enum
Allowed:
boolean
boolean
string
string
string
string
string
enum
Allowed:
string
string
length ≤ 100
Headers
string
required

Your api login from your account

string
required

Your api key from your account

Responses

401

Unauthorized.

403

Forbidden.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json