Authenticate users securely using Dojah’s OTP service.
This API enables you to send time-bound one-time passwords to users’ phone numbers,
then validate the code when they submit it. It’s ideal for login, signup,
transaction confirmation, and two-factor authentication (2FA).
Send OTP
Make a POST request to the send-otpendpoint with the user’s phone number. A 6-digit code is generated and sent via SMS using your registered Sender ID.
User Inputs OTP
The user enters the code they received.
Validate OTP
Make a POST request to the validate-otpendpoint with the phone number and the code. If valid and not expired, you’ll receive a success response.
Each OTP is valid for a limited time and can only be used once. You can also set your preferred OTP expiration time and resend behavior.