Revoke one of the caller's sessions.
POST
/v1/auth/sessions/{id}/revoke
const url = 'https://api.share2.us/v1/auth/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revoke';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://api.share2.us/v1/auth/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revoke \ --header 'Authorization: Bearer <token>'Accepts normal authentication, with Firebase browser requests requiring a valid X-Session-Id, or the scoped X-Session-Manage-Token issued by web-session registration when the session cap is reached. Scoped tokens can only revoke sessions belonging to their own account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Header Parameters
Section titled “Header Parameters”X-Session-Manage-Token
string
Short-lived scoped token accepted only by session list/revoke routes.
Responses
Section titled “Responses”Session revoked.
Media typeapplication/json
object
status
required
string
Example
{ "status": "ok"}Missing browser session (session_required) or invalid scoped token.
Session not found for the caller’s account.
default
Section titled “default”Standard error envelope.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "quota_exceeded" }}