Headless - OTP
Welcome to the OTP integration guide! Follow these steps to send and verify OTP using the OTPLESS Headless SDK.
Prerequisites
- Make sure you have followed the SDK Setup Guide before starting with this document.
- Ensure you have admin access to the OTPless Account.
Configure OTP Auth on Dashboard
- Log in to the OTPless dashboard with your registered email ID.
- Go to Configure Channel.
- Enable the phone or email channel based on your requirement.
- When you enable the channel, you will see the option to configure the auth method and delivery channel.
- Choose OTP as the auth method.
Important: Don’t forget to save and publish the configuration.
Choose your Programming Language:
Step 1: Send OTP
Choose your identity type to verify:
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for email verification, set the email address for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the email address and OTP for the verification request.
Request
Response
Step 1: Send OTP
Choose your identity type to verify:
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for email verification, set the email address for the OTP request.
Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the email address and OTP for the verification request.
Request
Response
Step 1: Send OTP
Choose your identity type to verify:
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request. Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for phone number verification, set the phone number and country code for the OTP request. Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the phone number, country code, and OTP for the verification request.
Request
Response
To initiate an OTP for email verification, set the email address for the OTP request. Request
Response
Step 2: Verify OTP
To verify the OTP entered by the user, set the email address and OTP for the verification request.
Request
Response
Step 3: Get Auth Token
Awesome! You’ve completed the client-side integration. Now, after the OTP is verified, you’ll get a callback with the ONETAP
response containing the token. You’ll need to parse the token from the response JSON.
Sample Callback JSON
You can view a complete sample response here
How to parse the token from response?
🏁 Check Point : Verify Auth Token
Once you have retrieved the token, send it to your backend and call the verify token API.
Verify Token API →
Was this page helpful?