Skip to main content
POST
/
connection
/
generate_token
Generate connection token
curl --request POST \
  --url https://api.partoo.co/v2/connection/generate_token \
  --header 'Content-Type: application/json' \
  --header 'x-APIKey: <api-key>' \
  --data '{
  "user_id": "5309c3a237bbc544d8e26737",
  "ttl": 3600
}'
{
  "token": "\\xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b",
  "expiration_date": "2019-08-01T19:15:54.256000+02:00"
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Body

application/json
user_id
string
required

User id

Example:

"5309c3a237bbc544d8e26737"

ttl
integer
default:86400

Token time to live in seconds. It can be maximum 1 day.

Required range: x <= 86400
Example:

3600

Response

OK

token
string

New connection token

Example:

"\\xaf3e8951c1f4c42f9cc53116b3fc855bd44bce01cf27604b"

expiration_date
string<date-time>

Expiration date of the newly created token

Example:

"2019-08-01T19:15:54.256000+02:00"