Login

TradingPartners AI uses a bearer token to authenticate requests.

A token has a validity period. Once it has expired, you will be asked to recreate one using this login API.

Note

The Server-Sent Event endpoint won't ask you to renew your token once connected to it.

To get a token, you must first create an account. You can do so using the Registration page.

You can then send a POST request to TradingPartners AI.

POST https://api.tradingpartners.ai/api/v1/users/login

Credentials object

Attributes


email - string min:1 max:255
Email address of the company contact


password - string min:1 max:30
Password of the company

Credentials object

{
  "email": "user@example.com",
  "password": "string"
}



Login response object

Attributes


accessToken - string max:4096
access-token to join for authenticated request


tokenType - string
access-token type


expiresIn - number fmt:float64
access-token duration in seconds


lastLogin - nullable string fmt:date-time
last login datetime

Login response object

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJUcmFkaW5nUGFydG5lcnNBSSB0ZXN0IiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.GjK1FVgF2QkCtVf-o1oGMkfRDl_-408UQTCnks_IKH8",
  "tokenType": "bearer",
  "expiresIn": 86400,
  "lastLogin": "2024-03-29T20:32:02.098Z"
}