curl -sS -X POST 'https://matrix.example.com/_matrix/client/v3/logout' -H "Authorization: Bearer $ACCESS_TOKEN"

Category: Matrix & Synapse

curl -sS -X POST 'https://matrix.example.com/_matrix/client/v3/logout' -H "Authorization: Bearer $ACCESS_TOKEN"

Log out the current session

Invalidates the access token used in the request, so it stops working immediately. The device remains on the account until it is deleted. To end every session of the user at once, use the logout/all endpoint instead, which is handy for rotating credentials in scripts. Password resets and deactivation also revoke tokens.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.