Get voice message play states

GET https://connect.suryojasvi.com/api/v1/messages/voice_plays

Whether the user has played the voice messages in a list of messages, and, for messages the user sent, whether anyone else has. Messages the user cannot access are left out, as is any beyond the first 200.

Changes: New in Zulip 13.0 (feature level ZF-ac1a1a).

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 GET -G https://connect.suryojasvi.com/api/v1/messages/voice_plays \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode 'message_ids=[16, 17]'

Parameters

message_ids (integer)[] required

Example: [16, 17]

The IDs of the messages to look up.


Response

Return values

  • voice_plays: (object)[]

    One entry for each message looked up.

    • message_id: integer

      The ID of the message.

    • played_by_me: boolean

      Whether the user has played it.

    • played_by_others: boolean

      For a message the user sent, whether anyone else has played it; always false for others.

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",
    "voice_plays": [
        {
            "message_id": 16,
            "played_by_me": true,
            "played_by_others": false
        }
    ]
}