Get user group membership status

GET https://vercre.zulipchat.com/api/v1/user_groups/{user_group_id}/members/{user_id}

Check whether a user is member of user group.

Changes: Prior to Zulip 10.0 (feature level 303), this would return true when passed a deactivated user who was a member of the user group before being deactivated.

New in Zulip 6.0 (feature level 127).

Usage examples

curl -sSX GET -G https://vercre.zulipchat.com/api/v1/user_groups/38/members/12 \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode direct_member_only=false

Parameters

user_group_id integer required in path

Example: 38

The ID of the target user group.


user_id integer required in path

Example: 12

The target user's ID.


direct_member_only boolean optional

Example: false

Whether to consider only the direct members of user group and not members of its subgroups. Default is false.


Response

Return values

  • is_user_group_member: boolean

    Whether the user is member of user group.

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:

{
    "is_user_group_member": false,
    "msg": "",
    "result": "success"
}