Authentication

Authenticates the user with the given email and password.

post

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-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Body

This is the model class for UserAuthentication.

usernamestring · min: 1Required

This represents the username of the user.

Example: john.doe
passwordstring · min: 1Required

This represents the password of the user.

Example: password
Responses
200
The request was successful.
application/json
post
POST /api/v1/users/auth HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "username": "john.doe",
  "password": "password"
}
{
  "success": true,
  "statusCode": 200,
  "message": "The request was successful.",
  "data": {
    "id": "asdasdcwAqrNxIT0xQdkMvR",
    "username": "user",
    "emailAddress": "[email protected]",
    "authKey": "8mgBXMwMchIWWlLmvEL9RasdasdcwAqrNxIT0xQdkMvRndmSjh4YmtOcjdZb2taUT09N1J5bVdzRDlUUWhhRFFwdlRhemk4ZDFuaFdHajYzVXlYLy9valkwYXpuQT0=",
    "expiresIn": "0001-01-01T00:00:00"
  },
  "errors": []
}

Last updated

Was this helpful?