Logout Current User Session
This endpoint allows an authenticated user to log out of any of their sessions on the workspace. It is designed specifically for the user to terminate their sessions and cannot be used to log out sessions belonging to other users on the workspace.
curl --location 'http://localhost:3000/api/v1/sessions/logout.me' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: ocFlTSMfowj9tSH1vQV6ANL9SiahkKUK1KhU_PpAUtT' \
--header 'X-User-Id: 2tTEqR7ZNMJ4HGGNa' \
Any of the following errors can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
- Session not found: Occurs when the
sessionIddoesn't belong to the current user making the request or does not exist.
Session not found
"message": "You must be logged in to do this."
"error": "Session not found"
Last modified 2mo ago