Docs

Sessions

Read, exchange and revoke the sessions of anonymous and signed-in users.

A session is the durable record of an anonymous or signed-in user. It holds the verified factors and the assurance levels they satisfy. A session lives for 24 hours after sign-in by default; the concepts page has the lifetimes.

A sign-in ends in a session: exchange the handoff token that an authentication attempt returns. From then on the browser holds the session cookie. Your app reads the session with GET /sessions/me and signs the user out with DELETE /sessions/me. Operators use the by-ID and query operations with a project secret.

MethodPathSummary
POST/sessionsCreate an anonymous session
POST/sessions/queryQuery sessions
POST/sessions/exchangeExchange a handoff token for a session
GET/sessions/{session_id}Get a session by ID
DELETE/sessions/{session_id}Revoke a session
GET/sessions/meGet my session
DELETE/sessions/meRevoke my session
GET/sessions/me/csrfGet my session's CSRF token

Was this helpful?