Set up two-factor authentication (2FA) with EnvoiSMS.ma

Set up two-factor authentication (2FA) with EnvoiSMS.ma

Integration steps

  1. Retrieve your API key in Settings > API
  2. Call the OTP sending endpoint specifying the number, the channel (SMS, WhatsApp, or both with fallback), and possibly the length/validity period of the code
  3. On user input, call the verification endpoint with the entered code
  4. If successful, your application authorizes the connection or transaction; in case of failure, display an error message and offer a resend (with throttling)

Example of usage scenarios

  • Login to a user account from a new device
  • Confirmation of a bank transaction or payment
  • Password reset
  • Validation of a registration (real telephone number)

See the full API documentation (API category and technical documentation) for code examples by language.

Was this article helpful?