keyAuthentication

The JFW API uses Auth Keys to authenticate Protocol requests. You can obtain an Auth Key by either using the JFW libraries or calling the following API endpoint:

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
emailAddressstring · nullableRead-onlyOptional

The email address of the user to authenticate.

passwordstring · min: 1Required

This represents the password of the user.

Example: password
Responses
chevron-right
200

The request was successful.

application/json

The API result model with data.

successbooleanRead-onlyRequired

This is the flag to indicate whether the API call is successful or not.

statusCodeinteger · int32Read-onlyRequired

This is the HTTP status code. This is used to determine the status code to be returned to the client.

messagestring · min: 1Required

This is the message to be displayed to the user.

post
/api/v1/users/auth

After having the Auth Key, you have to put that Auth Key and Brand URLarrow-up-right to your HTTP request headerarrow-up-right to use other API endpoints.

Brand-URL: your-domain.com
Auth-Key: your-key-is-here
circle-exclamation

If you need to use the device access, add the key header Device-Code before using the device access feature.

Last updated