Login with OTP
Authenticate a user using their phone number and the OTP code received via SMS. This endpoint returns a JWT token for subsequent API calls.OTP codes must be verified within 5 minutes of generation. After 3 failed attempts, a new OTP must be requested.
Request Body
User’s phone number in international format (same as used for OTP request)
6-digit OTP code received via SMS
Optional device identifier for session tracking
Response
Indicates if the login was successful
Human-readable message about the operation
Token Usage
After successful login, use the JWT token for authenticated requests:Security Best Practices
Token Storage: Store tokens securely using platform-specific secure storage:
- Web: HttpOnly cookies or secure localStorage
- Mobile: Keychain (iOS) or Keystore (Android)
- Server: Environment variables or secure configuration
Never expose tokens in:
- URL parameters
- Browser console logs
- Version control systems
- Client-side JavaScript source