Revoke all other sessions
POST
/sessions/revoke-others
const url = 'https://auth.timetonic.com/api/sessions/revoke-others';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://auth.timetonic.com/api/sessions/revoke-others \ --header 'Authorization: Bearer <token>'Revoke every active session for the user except the current one. Each revoked session’s access token (next request) and refresh-token chain are invalidated.
Authorizations
Section intitulée « Authorizations »Responses
Section intitulée « Responses »Other sessions revoked
Media typeapplication/json
object
success
boolean
message
string
revoked
Number of sessions revoked
integer
Example
{ "success": true, "revoked": 3}Authentication required or failed
Media typeapplication/json
object
success
boolean
error
string
message
string
Example
{ "success": false, "error": "unauthorized", "message": "Authentication required"}Rate limit exceeded
Media typeapplication/json
object
success
boolean
error
string
message
string
retry_after
integer
Example
{ "success": false, "error": "too_many_requests", "message": "Too many requests", "retry_after": 45}