Remove an FCM registration token


This endpoint removes an FCM registration token for push notifications.

Usage examples

#!/usr/bin/env python3

import zulip

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

request = {
    "token": "android-token",
result = client.call_endpoint(
    url="/users/me/android_gcm_reg_id", method="DELETE", request=request

curl -sSX DELETE \
    --data-urlencode token=android-token


token string required

Example: "android-token"

The token provided by the device.


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