GET https://zulip.icams.rub.de/api/v1/users/{user_id}/subscriptions/{stream_id}
Check whether a user is subscribed to a stream.
Changes: New in Zulip 3.0 (feature level 12).
Usage examples
Python
curl
#!/usr/bin/env python3importzulip# Pass the path to your zuliprc file here.client=zulip.Client(config_file="~/zuliprc")# Check whether a user is a subscriber to a given stream.user_id=7stream_id=1result=client.call_endpoint(url=f"/users/{user_id}/subscriptions/{stream_id}",method="GET",)print(result)
curl -sSX GET -G https://zulip.icams.rub.de/api/v1/users/12/subscriptions/1 \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY
Parameters
user_idintegerrequired in path
Example: 12
The target user's ID.
stream_idintegerrequired in path
Example: 1
The ID of the stream to access.
Response
Return values
is_subscribed: boolean
Whether the user is subscribed to the stream.
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.