Revoke all sessions
DELETE
/api/server/v1/users/{userId}/sessions
const url = 'https://api.torii.so/api/server/v1/users/01931a73-8b00-7000-8000-000000000000/sessions';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.torii.so/api/server/v1/users/01931a73-8b00-7000-8000-000000000000/sessionsImmediately revokes every active session for the user. Idempotent.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” userId
required
string format: uuid
Identifier of the user whose sessions to revoke.
Example
01931a73-8b00-7000-8000-000000000000Responses
Section titled “ Responses ”Sessions revoked.
Missing or invalid secret key.
Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}User belongs to a different environment.
Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}