Documentation Index
Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Send an OTP (one-time password) code to the user’s registered phone number. This endpoint is called when:
POST /v1/auth/login returns isOtpRequired: true
- User needs two-factor authentication for login
- You need to resend an expired OTP code
The OTP code is typically 6 digits and expires after a few minutes.
Request
Body
User’s unique identifier from login responseFormat: UUIDExample: b6b9168c-bb56-4c6a-9c0d-4650ea74f5f9
Response
Code Examples
curl -X POST "https://dev.api.baanx.com/v1/auth/login/otp" \
-H "x-client-key: your-client-key" \
-H "Content-Type: application/json" \
-d '{"userId": "b6b9168c-bb56-4c6a-9c0d-4650ea74f5f9"}'
OTP codes expire after a few minutes. Implement a “Resend Code” button that calls this endpoint again.