The Session object is an abstraction over an HTTP session. It models the period of information exchange between a user and the server. Sessions are created when a user successfully goes through the sign in or sign up flows.
Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first.
Success
Request was not successful
Authentication invalid
Invalid request parameters
[- {
- "object": "session",
- "id": "string",
- "user_id": "string",
- "client_id": "string",
- "actor": { },
- "status": "active",
- "last_active_organization_id": "string",
- "last_active_at": 0,
- "expire_at": 0,
- "abandon_at": 0,
- "updated_at": 0,
- "created_at": 0
}
]
Retrieve the details of a session
Success
Request was not successful
Authentication invalid
Resource not found
{- "object": "session",
- "id": "string",
- "user_id": "string",
- "client_id": "string",
- "actor": { },
- "status": "active",
- "last_active_organization_id": "string",
- "last_active_at": 0,
- "expire_at": 0,
- "abandon_at": 0,
- "updated_at": 0,
- "created_at": 0
}
Sets the status of a session as "revoked", which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again.
Success
Request was not successful
Authentication invalid
Resource not found
{- "object": "session",
- "id": "string",
- "user_id": "string",
- "client_id": "string",
- "actor": { },
- "status": "active",
- "last_active_organization_id": "string",
- "last_active_at": 0,
- "expire_at": 0,
- "abandon_at": 0,
- "updated_at": 0,
- "created_at": 0
}
Returns the session if it is authenticated, otherwise returns an error.
Success
Request was not successful
Authentication invalid
Resource not found
{- "token": "string"
}
{- "object": "session",
- "id": "string",
- "user_id": "string",
- "client_id": "string",
- "actor": { },
- "status": "active",
- "last_active_organization_id": "string",
- "last_active_at": 0,
- "expire_at": 0,
- "abandon_at": 0,
- "updated_at": 0,
- "created_at": 0
}
Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance
OK
Authentication invalid
Resource not found
{- "object": "token",
- "jwt": "string"
}