Mint a short-lived live-activity token (dashboard session)
Mints a short-lived, analytics-scoped Portal JWT used to open the environment's live-activity WebSocket on the realtime edge. Dashboard session auth — this route is authenticated with a Clerk dashboard session (the same session the Portal dashboard uses), not with a secret key, and the caller must belong to the organization that owns the environment.
Flagged in the PR: OpenAPI's
http bearerscheme does not cleanly model a browser-cookie dashboard session, so this operation is described with adashboard-sessionsecurity scheme (documentation-only — it carries no header a client sends programmatically). Integrators building custom dashboards should use the Portal dashboard instead of calling this route directly. The token has a fixed 15-minute TTL and ananalyticsscope; it is refused on channel and inbox routes.
Path Parameters
- Type: stringenv
Id requiredThe environment id.
Responses
- application/json
- application/json
- application/json
- application/json
curl https://api.useportal.co/v1/environments/env_abc123/logs-token \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImVudl8xMjMifQ.eyJzdWIiOiJkYXNoYm9hcmQ6dXNlcl9hYmMiLCJhbm9uIjpmYWxzZSwic2NvcGUiOiJhbmFseXRpY3MiLCJpYXQiOjE3NTI5MTIwMDAsImV4cCI6MTc1MjkxMjkwMH0.signature",
"expiresAt": "2026-07-19T02:15:00.000Z"
}