Revoke an authorized client

DELETE https://z.u1v.ru/api/v1/users/me/authorized_clients/{client_id}

Revoke a non-current authorized client for the current user. For a web session, this deletes the corresponding server-side Django session. For a per-client API token, this revokes only that token and removes linked push-device registration.

The current client cannot be revoked through this endpoint; use the normal logout flow to end the current session.

Changes: New in Zulip 12.0 (feature level 499) for web sessions. In feature level 500, this also supports per-client API-token clients.

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX DELETE https://z.u1v.ru/api/v1/users/me/authorized_clients/ac_6pQk2rYv \
    -u EMAIL_ADDRESS:API_KEY

Parameters

client_id string required in path

Example: "ac_6pQk2rYv"

The opaque ID of the authorized client to revoke.


Response

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

The requested authorized client is the current client.

{
    "code": "CANNOT_REVOKE_CURRENT_CLIENT",
    "msg": "Use the normal logout flow to end the current session.",
    "result": "error"
}

The requested authorized client does not exist, is already revoked, or is not owned by the current user.

{
    "msg": "Invalid authorized client.",
    "result": "error"
}