Users

Revoke a user session

Revoke a specific user session by its ID, optionally revoking associated target grants and tokens.

delete/api/users/{userId}/sessions/{sessionId}

Request

  • Base URL: https://[tenant_id].logto.app
  • URL: https://[tenant_id].logto.app/api/users/{userId}/sessions/{sessionId}
  • Auth: OAuth 2 (client credentials, token URL /oidc/token, scopes: all)

Path parameters

userIdstring required

The unique identifier of the user.

sessionIdstring required

The unique identifier of the session.

Query parameters

revokeGrantsTarget'all' | 'firstParty'

Optional target for revoking associated grants and tokens. 'all' revokes grants for every application authorized by this session. 'firstParty' revokes only first-party app grants; third-party app grants remain active. If omitted, grants remain active when the session authorizations include offline_access; otherwise they are revoked.

Response

Session revoked successfully.

Changes

No recorded changes to this operation across all 8 revisions of this API.