Send a test notification to mobile device(s)

POST https://mariadb.zulipchat.com/api/v1/mobile_push/test_notification

Trigger sending a test push notification to the user's selected mobile device or all of their mobile devices.

Changes: Starting with Zulip 8.0 (feature level 234), test notifications sent via this endpoint use test rather than test-by-device-token in the event field. Also, as of this feature level, all mobile push notifications now include a realm_name field.

New in Zulip 8.0 (feature level 217).

Usage examples

curl -sSX POST https://mariadb.zulipchat.com/api/v1/mobile_push/test_notification \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode token=111222

Parameters

token string optional

Example: "111222"

The push token for the device to which to send the test notification.

If this parameter is not submitted, the test notification will be sent to all of the user's devices registered on the server.

A mobile client should pass this parameter, to avoid triggering a test notification for other clients.


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

Invalid push device token

A typical failed JSON response for when the push device token is not recognized by the Zulip server:

{
    "code": "INVALID_PUSH_DEVICE_TOKEN",
    "msg": "Device not recognized",
    "result": "error"
}

Invalid push device token

A typical failed JSON response for when the push device token is not recognized by the push notification bouncer:

{
    "code": "INVALID_REMOTE_PUSH_DEVICE_TOKEN",
    "msg": "Device not recognized by the push bouncer",
    "result": "error"
}