Skip to content

POST   /auth/login (apiKey)

Get auth session token

Get auth session token using API key and secret. This is the preferred method for authenticating using apikeys and secrets.

Request Body

{
"apiKey": "string",
"apiSecret": "string"
}

Try it out

Loading...

Output:

Responses

Description

Successfully logged in

{
"id": 0,
"email": "string",
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string",
"primaryAccount": {
"accountName": "string",
"accountId": "string",
"usersPrimaryAccount": false,
"accountAdmin": false,
"id": "string",
"uniqueId": "string",
"name": "string",
"repcode": "string",
"customerServicePhone": "string",
"customerServiceEmail": "string",
"whitelabelSettings": {},
"permissions": [
"string"
],
"roles": [
"string"
]
},
"accounts": [
{
"accountName": "string",
"accountId": "string",
"usersPrimaryAccount": false,
"accountAdmin": false,
"id": "string",
"uniqueId": "string",
"name": "string",
"repcode": "string",
"customerServicePhone": "string",
"customerServiceEmail": "string",
"whitelabelSettings": {},
"permissions": [
"string"
],
"roles": [
"string"
]
}
],
"flatRolesList": [
"string"
],
"flatPermissionsList": [
"string"
],
"token": "string"
}

References

#/components/schemas/ApiKeyLogin

type: object
required:
- apiKey
- apiSecret
properties:
apiKey:
type: string
description: The API key to authenticate with
apiSecret:
type: string
description: The API secret to authenticate with

#/components/schemas/Account

description: The user's primary account
type: object
required:
- accountName
- accountId
- id
- name
properties:
accountName:
type: string
description: Name of the account
accountId:
type: string
description: Unique identifier of the account
usersPrimaryAccount:
type: boolean
description: Whether this is the user's primary account
accountAdmin:
type: boolean
description: Whether the user is an administrator of this account
id:
type: string
uniqueId:
type: string
name:
type: string
repcode:
type: string
customerServicePhone:
type: string
description: Customer service phone number
customerServiceEmail:
type: string
description: Customer service email address
whitelabelSettings:
type: object
description: WhiteLabel Settings
permissions:
type: array
items:
type: string
roles:
type: array
items:
type: string

#/components/schemas/ApiKeyLoginResponse

type: object
required:
- id
- email
- token
properties:
id:
type: integer
description: User ID associated with the API key
email:
type: string
description: Email address associated with the user
createdBy:
type: string
updatedBy:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
primaryAccount:
$ref: "#/components/schemas/Account"
accounts:
type: array
items:
$ref: "#/components/schemas/Account"
description: List of accounts the user belongs to
flatRolesList:
type: array
items:
type: string
description: List of role IDs assigned to the user
flatPermissionsList:
type: array
items:
type: string
description: List of permission IDs granted to the user
token:
type: string
description: Authentication token to use for subsequent API requests

Or the swagger.yaml spec this documentation was generated from: /apikeys/swagger.yaml