Authentication by phone number
After a successful authentication, the following headers must be included to register or update the user’s device:
- X-Device-Code: A unique identifier for the device.
- X-Device-Token: The Firebase device token used for push notifications.
- X-Device-Name: The name/model of the device.
- X-App-Version-Number: The version of the application.
- X-Os-Device: The operating system of the device (iOS, Android).
Header parameters
Brand-URLstringRequiredExample:
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Body
This is the model class for UserAuthentication.
phoneNumberstring · min: 1RequiredExample:
This represents the phone number of the user. The phone number must be following the E.164 format.
john.doe
passwordstring · min: 1RequiredExample:
This represents the password of the user.
password
Responses
200
The request was successful.
application/json
429
API call exceeded rate limit due to too many requests.
application/json
post
POST /api/v1/users/auth/phone-number HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Content-Type: application/json
Accept: */*
Content-Length: 50
{
"phoneNumber": "+123456789",
"password": "password"
}
{
"success": true,
"statusCode": 200,
"message": "The request was successful.",
"data": {
"id": "asdasdcwAqrNxIT0xQdkMvR",
"username": "user",
"emailAddress": "[email protected]",
"phoneNumber": "+123456789",
"authKey": "8mgBXMwMchIWWlLmvEL9RasdasdcwAqrNxIT0xQdkMvRndmSjh4YmtOcjdZb2taUT09N1J5bVdzRDlUUWhhRFFwdlRhemk4ZDFuaFdHajYzVXlYLy9valkwYXpuQT0=",
"refreshAuthKey": "Li48YUZxXkS52eNwx5D2yA4axptAvd1IWGxCZndDODFQTTZ5VnNoOVFLb1RGdz09cmlLTXQ4c1Y0RENDSHQ1QWtMU2I4a0tOem05QmtNd0pTUlpGenpsc0hBOD0=",
"expiresIn": "2025-10-12T08:18:49.770234Z"
},
"errors": []
}
Last updated
Was this helpful?