Close one of the person’s other sessions
DELETE
/v1/auth/sessions/{id}
const url = 'https://api.emite.cr/v1/auth/sessions/example';const options = { method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{"currentPassword":"example"}'};
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.emite.cr/v1/auth/sessions/example \ --header 'Content-Type: application/json' \ --data '{ "currentPassword": "example" }'Requires the current password. SESSION_NOT_FOUND when the session is not theirs or already ended; the current session cannot be closed here (SESSION_IS_CURRENT — sign out instead).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
currentPassword
required
The current password of the account: whoever copied a session token cannot use it to close the sessions of the person. A wrong one answers 400 INVALID_CURRENT_PASSWORD.
string
Examplegenerated
{ "currentPassword": "example"}