Get the subscribers of a stream

GET https://chat.nsg.net.ru/api/v1/streams/{stream_id}/members

Get all users subscribed to a stream.

Usage examples

#!/usr/bin/env python3

import zulip

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

# Get the subscribers to a stream
result = client.get_subscribers(stream="new stream")
print(result)

curl -sSX GET -G https://chat.nsg.net.ru/api/v1/streams/1/members \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

stream_id integer required in path

Example: 1

The ID of the stream to access.


Response

Return values

  • subscribers: (integer)[]

    A list containing the IDs of all active users who are subscribed to the stream.

Example response(s)

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success",
    "subscribers": [
        11,
        26
    ]
}

An example JSON response for when the requested stream does not exist, or where the user does not have permission to access the target stream:

{
    "code": "BAD_REQUEST",
    "msg": "Invalid stream ID",
    "result": "error"
}