OTP & 2FA

Reliable OTP codes for all Moroccan mobile networks.

Implement two-factor authentication (2FA) or phone verification in minutes. Our /verify API handles code generation, delivery, TTL and server-side validation.

OTP SMS Simulator

Local routes + automatic failover

Maroc Telecom / Orange / Inwi

9:41

Waiting for the OTP request...

Intégration API Verify

POST /v1/verify/send200 OK
// Node.js - Envoyer un code de validation OTP
const res = await fetch("https://api.envoisms.ma/v1/verify/send", {
  method: "POST",
  headers: {
    "Authorization": "Bearer ENV_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    to: "+212612-345678",
    brand: "EnvoiSMS",
    code_length: 4,
    expiry: 300 // Valable 5 minutes
  })
});
const data = await res.json();
console.log("Session OTP initialisée:", data.session_id);

Local routes and delivery receipts

Local routes to IAM, Orange and Inwi, with automatic failover between routes, and a real delivery receipt for every code, so you know whether your user received it.

One-call /verify API

One POST to send the code, one POST to validate it. TTL management, brute-force protection and +212 number normalisation are all handled server-side.

Secure your transactions today

Create your account for free and get 5 MAD of test credit instantly.

Get started free