Documentation

api.users.usergroups

Fetch the user groups for a user by their user_id.

Arguments:

def api.users.usergroups(
  user_id: str = None, # User ID
):

Returns list of dict in the form { 'usergroup_id': <int>, 'name': <str> } representing the user groups that the user is in.

Example:

groups = api.users.usergroups(user_id="foo") # groups = [ <dict> ]