Exchange session token
Exchange a short-lived session token for a long-lived browser session.
This endpoint is unauthenticated. The session token itself serves as proof of authorization. Each token can only be exchanged once; subsequent attempts return 401.
The returned browser session token is valid for 24 hours and should be stored as an httpOnly cookie or used in the Authorization header for subsequent API calls.
POST
Python (SDK)
Body
application/json
The session token ID received from portal.createSession.
Must be valid, unexpired, and not previously exchanged.
Minimum string length:
1Example:
"pst_abc123def456"
Response
Session exchanged successfully. Use the returned token for subsequent API calls.
Last modified on July 23, 2026
Previous
Get portal verificationsReturn a verification analytics timeseries for the authenticated portal
session's end user.
Authenticates only with a portal session cookie and always restricts results
to verification events attributed to the session's external identity. Unlike
`analytics.getVerifications`, this endpoint takes a fixed time window (no
query language) and returns a zero-filled, outcome-broken-out timeseries.
Bucket granularity is chosen automatically from the window size.
Next
Python (SDK)