logoAccess

Create portal session

POST
/api/v1/customers/portal/sessions

Generate a short-lived portal token for a customer.

Authorization

apiKeyHeader
headerx-api-key<token>

API key for authentication. Generate from the dashboard or via POST /v1/api-keys.

Header Parameters

x-api-key*string

API key for authentication

Length1 <= length

Request Body

  1. body
customer_id*string

ID of the customer to create a portal session for

expires_in?number

Session TTL in seconds. Min 300 (5 min), max 86400 (24 h). Defaults to 3600 (1 hour)

Range300 <= value <= 86400
Default3600

Response Body

Response for status 200

application/json
  1. response
url*string
token*string
customer_id*string
expires_at*string
curl -X POST 'https://api.tryaccess.xyz/api/v1/customers/portal/sessions' \  -H 'x-api-key: string' \  -H 'Content-Type: application/json' \  -d '{  "customer_id": "cus_01J9Z8K2P3Q4R5S6T7U8V9W0X1"}'
{  "url": "string",  "token": "string",  "customer_id": "string",  "expires_at": "string"}

How is this guide?