Skip to content

Close every other session of the person

POST
/v1/auth/sessions/revoke-others
curl --request POST \
--url https://api.emite.cr/v1/auth/sessions/revoke-others \
--header 'Content-Type: application/json' \
--data '{ "currentPassword": "example" }'

Requires the current password. This session continues under a new token (returned in the X-Session-Token header); a copy of the previous token stops working within 30 seconds. Also unlinks the person’s WhatsApp number.

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"
}

The other sessions are closed; this one goes on under the new token.

Media typeapplication/json
object
revoked
required

How many other sessions were still usable and got closed.

number
whatsappUnlinked
required

true when the person had a WhatsApp number linked and it was unlinked with the sessions; false when none was unlinked.

boolean
Example
{
"revoked": 2,
"whatsappUnlinked": false
}