ws-session cookie is minted on every sign-in and lives 30 days. These
three endpoints let you see them and end them. They are on
https://dash.square1.dev and accept either the cookie or a Bearer API key.
Sessions and API keys are separate credentials with separate lifecycles.
Revoking sessions does not touch your keys, and rotating your keys does not
end your sessions. To cut off both, do both.
List sessions — GET /api/user/me/sessions
The full IP is never sent. There is no parameter to unmask it — the
masking happens before the row leaves the server.
About id
id is the first 16 hex characters of the session token’s SHA-256, not the
token itself. It is not a secret: the only thing it can do is delete your
own session, because every query behind these endpoints is scoped to your
account.
current under Bearer auth
The cap of 200 applies to this listing only. Rows beyond it still exist and
are still ended by revoke others below.
Revoke one session — DELETE /api/user/me/sessions/:id
You cannot delete your own current session here. That is intentional —
removing a row from a device list shouldn’t silently log you out. Sign out
normally instead, or use revoke-others to clear everything else.The
409 is only reachable when you authenticate with the cookie. Under
Bearer auth no row is current, so any valid id deletes.Revoke every other session — POST /api/user/me/sessions/revoke-others
revoked is the number of session rows deleted.
Unlike the listing, this is not capped at 200 — sessions that were truncated
out of the list are ended too. The audit record stores the count only, not
which devices.
Related
- Changing your password revokes every session and reissues the current one in the same request — see Password and passkeys.
- API keys are managed separately at API keys.