Skip to main content

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

FieldTypeRequiredDescription
mobile_numberStringYesMobile phone number

Example Requests

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)

Response Fields

FieldTypeDescription
ttlIntegerTime to live (TTL) for the OTP in seconds

Example Responses

{
"ttl": 300
}

Notes

  • The mobile_number field 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 ttl time is expired