Sign-in with OTP
Sign in using a One-Time Password (OTP).
HTTP Request
POST/api/users/auth/otp/signin
Authorization
Authorization
- Required: No
- Permission: None
- Authentication: None
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| mobile_number | String | Yes | Mobile phone number |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3api = requests.Session()
4response = api.post(
5 'http://www.example.com/api/users/auth/otp/signin/',
6 json={
7 "mobile_number": "+1234567890"
8 }
9)1curl "http://www.example.com/api/users/auth/otp/signin/" -X POST -H "Content-Type: application/json" -d '{
2 "mobile_number": "+1234567890"
3}'Response Fields
| Field | Type | Description |
|---|---|---|
| ttl | Integer | Time to live (TTL) for the OTP in seconds |
Example Responses
{
"ttl": 300
}
Notes
- The
mobile_numberfield must be provided. - The response will contain a
ttl(time to live) value indicating how long the OTP is valid. - The OTP will be sent to the user's mobile number via SMS.
- A new otp is only available after the
ttltime is expired