Skip to main content
POST
Generate authorization token for local user

Headers

x-site-context
object
required

The x-site-context is a JSON object that must contain date, and channel attributes. eg - {"date":"2020-12-12T08:00:00.000Z","channel":12}

Body

application/json
accountId
number

Merchant's 10 character copilot account ID

Example:

4781348886

username
string

Username or email address of the user who will log in

Example:

"john@fabric.inc"

password
string

Password using which you log into fabric copilot UI

Example:

"joHn@123456789!"

Response

OK

_id
string

fabric internal ID

Example:

"60c3a2c476f9c21239d836ca"

account
object

Copilot account information

roles
string[]

List of available roles for the user

Role description, such as administrator, manager, and so on

permissions
string[]

List of available permissions for the user

Permission description

refreshToken
object

Refresh token

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0...."

accessToken
object

Access Token. This is the token to consume the copilot APIs.

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVC.eyJpZCI6IjYwYzNhMmM0...."