Passwordless OTP Authentication API
This API provides passwordless authentication using One-Time Passwords (OTP). It supports two main operations:
Generate OTP: Send an email with a verification code to the user
Verify OTP: Validate the OTP code and return authentication token
The API accepts POST requests with JSON data containing the operation type and email address.
Enter your Company Name: (Optional)
API Endpoints
Generate OTP Endpoint
To request a new OTP code, send a POST request with the following JSON structure:
Response:
- Success: Returns
{success: true, message: "OTP Sent Successfully!"}
- Error: Returns appropriate error message
Verify OTP Endpoint
To verify an OTP code and get authentication token, send a POST request with:
Response:
- Success: Returns
{token: "...", user: {...}, Success: true, message: "User verified Successfully!"}
- Error: Returns appropriate error message