Getting Started with OTPLESS API

To kickstart your integration with the OTPLESS API and unlock the full potential of passwordless authentication, follow these initial steps:

1

Obtain API Credentials

Before you can make any API requests, you’ll need to obtain your unique clientId and clientSecret.

These credentials are vital for authenticating your API requests and ensuring secure access to our features. Register on our platform to get your credentials.

2

Authenticate Your Requests

With your credentials in hand, you’re ready to authenticate your API calls. Include your clientId and clientSecret whereever neccessary in all OTPLESS API requests.

3

OTPless Pro Plan

These API is accessible exclusively to users subscribed to the OTPless Pro plan. Ensure you have an active OTPless Pro Plan subscription to utilize this feature..

4

Make Your First API Call

Once authenticated and subscribed, you can start making API calls. Begin with a simple request to familiarize yourself with our API structure and response patterns. Here’s an example of a basic API call to our system:

curl --location 'https://auth.otpless.app/auth/v1/initiate/otp' \
--header 'clientId: YOUR_CLIENT_ID' \
--header 'clientSecret: YOUR_CLIENT_SECRET' \
--header 'Content-Type: application/json' \
--data '{
    "phoneNumber": "USER_PHONE",
    "channels": ["WHATSAPP","SMS"]
}'

Understanding Response Codes

As you make requests, the OTPLESS API uses standard HTTP response codes to indicate the outcome:

  • 2xx codes signal successful operations.
  • 4xx codes indicate issues with the request, often related to user input or authentication.
  • 5xx codes point to server-side errors that need our attention.

For a detailed explanation of these codes and troubleshooting tips, visit our Error Codes section.

Need Help?

If you encounter any issues or have questions, our dedicated support team is ready to assist you. Reach out through our Support Channel for technical support, feedback, or any inquiries.