Overview
TheprincipalSessions sub-client lets you create short-lived session tokens for your end-users. These tokens power the Permission Dashboard where users can view which agents have access and revoke grants.
principalSessions.create()
Create a session token for an end-user. Returns a URL they can open to manage their permissions.Parameters: CreatePrincipalSessionParams
string
required
The end-user’s principal ID — the same
userId used in grantex.authorize().string
Session duration. Format:
"30m", "1h", "24h". Defaults to "1h", capped at "24h".Response: PrincipalSessionResponse
string
The signed JWT session token.
string
Full URL the user can open in their browser to view and revoke permissions. The session token is carried in the URL fragment (
#session=...), not the query string, so it is never transmitted to the server or captured in Referer headers or access logs.string
ISO 8601 timestamp when the session token expires.