Remove an APNs device token

DELETE https://z.u1v.ru/api/v1/users/me/apns_device_token

This endpoint removes an APNs device token for iOS push notifications.

Changes: Deprecated in Zulip 11.0 (feature level 406) and will be removed in a future release. Clients supporting E2EE push notifications use Register E2EE push device.

With the modern device_id protocol, remove the server-side device record through Remove a registered device when logging out, and remove the corresponding local account and push keys to stop displaying notifications for that registration. Earlier protocols used push_account_id. Removing a device registration does not revoke API-client credentials; manage authorization through authorized clients.

Usage examples

#!/usr/bin/env python3

import pero

# Pass the path to your perorc file here.
client = pero.Client(config_file="~/.perorc")

request = {
    "token": "c0ffee",
}
result = client.call_endpoint(
    url="/users/me/apns_device_token", method="DELETE", request=request
)
print(result)

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

curl -sSX DELETE https://z.u1v.ru/api/v1/users/me/apns_device_token \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode token=c0ffee

Parameters

token string required

Example: "c0ffee"

The token provided by the device.


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"
}

A typical failed JSON response for when the token's length is invalid or it is empty:

{
    "code": "BAD_REQUEST",
    "msg": "Empty or invalid length token",
    "result": "error"
}

A typical failed JSON response for when the token does not exist:

{
    "code": "BAD_REQUEST",
    "msg": "Token does not exist",
    "result": "error"
}