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"}{ "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"}Description
Unauthorized - Invalid API key or secret
Description
Internal server error
References
#/components/schemas/ApiKeyLogin#/components/schemas/Account#/components/schemas/ApiKeyLoginResponse
#/components/schemas/ApiKeyLogin
type: objectrequired: - apiKey - apiSecretproperties: apiKey: type: string description: The API key to authenticate with apiSecret: type: string description: The API secret to authenticate with|export interface ApiKeyLogin { /** The API key to authenticate with */ apiKey: string; /** The API secret to authenticate with */ apiSecret: string;}#/components/schemas/Account
description: The user's primary accounttype: objectrequired: - accountName - accountId - id - nameproperties: 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|export interface Account { /** Name of the account */ accountName: string; /** Unique identifier of the account */ accountId: string; /** Whether this is the user's primary account */ usersPrimaryAccount?: boolean; /** Whether the user is an administrator of this account */ accountAdmin?: boolean; id: string; uniqueId?: string; name: string; repcode?: string; /** Customer service phone number */ customerServicePhone?: string; /** Customer service email address */ customerServiceEmail?: string; /** WhiteLabel Settings */ whitelabelSettings?: {}; permissions?: string[]; roles?: string[];}#/components/schemas/ApiKeyLoginResponse
type: objectrequired: - id - email - tokenproperties: 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|export interface ApiKeyLoginResponse { /** User ID associated with the API key */ id: number; /** Email address associated with the user */ email: string; createdBy?: string; updatedBy?: string; createdAt?: Date; updatedAt?: Date; primaryAccount?: Account; /** List of accounts the user belongs to */ accounts?: Account[]; /** List of role IDs assigned to the user */ flatRolesList?: string[]; /** List of permission IDs granted to the user */ flatPermissionsList?: string[]; /** Authentication token to use for subsequent API requests */ token: string;}Or the swagger.yaml spec this documentation was generated from:
/apikeys/swagger.yaml