Sends a test notification to the user's mobile device(s)
POST https://elec-a7100-summer-2022.zulip.aalto.fi/api/v1/mobile_push/test_notification
This endpoint allows a user to trigger a test push notification to their
selected mobile device, or all 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. (All mobile push
notifications also now include a realm_name
field as well as
of this feature level).
New in Zulip 8.0 (feature level 217).
Usage examples
curl -sSX POST https://elec-a7100-summer-2022.zulip.aalto.fi/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.
Mobile device clients should pass this parameter in order to trigger a notification
that is only delivered to this client.
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"
}