Passer au contenu principal
POST
/
otp
/
send
Envoyer un code OTP
curl --request POST \
  --url https://api.notiline.net/v1/otp/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel": "SMS",
  "sender": "NOTILINE",
  "to": "+2250709538217",
  "message": "Bonjour, votre code de vérification est ##OTP##",
  "otp_type": "numeric",
  "otp_length": 4,
  "otp_expiry": 300,
  "use_local_number": false,
  "application_name": "Mon application",
  "language": "fr"
}
'
{
  "status": 200,
  "message": "succès",
  "data": {
    "uniq_id": "A1B2C3D4E5F6",
    "code": "1234",
    "expires_at": 1643723400
  }
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
channel
enum<string>

Canal d'envoi (SMS ou EMAIL)

Options disponibles:
SMS,
EMAIL
Exemple:

"SMS"

sender
string | null

Nom de l'expéditeur

Exemple:

"NOTILINE"

to
string

Destinataire

Exemple:

"+2250709538217"

message
string | null

Message

Exemple:

"Bonjour, votre code de vérification est ##OTP##"

otp_type
enum<string> | null

Type de code OTP (numérique ou alphanumérique)

Options disponibles:
numeric,
alphanumeric
Exemple:

"numeric"

otp_length
integer | null

Longueur du code OTP

Plage requise: 4 <= x <= 6
Exemple:

4

otp_expiry
integer | null

Durée de vie du code OTP

Plage requise: 60 <= x <= 3600
Exemple:

300

use_local_number
boolean | null

Utiliser un numéro local

Exemple:

false

application_name
string | null

Nom de l'application

Exemple:

"Mon application"

language
enum<string> | null

Langue du message

Options disponibles:
fr,
en,
es,
pt
Exemple:

"fr"

Réponse

Code OTP envoyé avec succès

status
integer
Exemple:

200

message
string
Exemple:

"succès"

data
object