Skip to Content
Developers
Portal sessions

A short-lived token for one buyer or publisher, for your own web page to use

Needs no scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/account/portal-sessions

Needs buyers:read (or publishers:read) on the key, and :write for read_write. The token works only on that party’s Buyer or Publisher API, only from the origins named, for at most 15 minutes.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Request Body

application/json
  1. body
party*string
Match^(buyer|publisher):[0-9a-f-]{36}$
origins*array<>
Items1 <= items <= 5
access?string
Default"read"
Value in"read""read_write"
ttlSeconds?integer
Range60 <= value <= 900
Default900

Response Body

Success

application/json
  1. response
id*string
Formatuuid
token*string
party*string
access*string
Value in"read""read_write"
origins*array<string>
expiresAt*string
Example Request
curl -X POST 'https://api.traki.io/v1/account/portal-sessions' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{  "party": "string",  "origins": [    "string"  ]}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "token": "string",  "party": "string",  "access": "read",  "origins": [    "string"  ],  "expiresAt": "string"}