Get all users
Retrieve all users in a realm.
GET https://aniket.chat.convergenceservices.in/api/v1/users
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Get all users in the realm
result = client.get_members()
print(result)
# You may pass the `client_gravatar` query parameter as follows:
result = client.get_members({'client_gravatar': True})
print(result)
 
More examples and documentation can be found here.
const zulip = require('zulip-js');
// Pass the path to your zuliprc file here.
const config = {
    zuliprc: 'zuliprc',
};
zulip(config).then((client) => {
    // Get all users in the realm
    client.users.retrieve().then(console.log);
    // You may pass the `client_gravatar` query parameter as follows:
    client.users.retrieve({client_gravatar: true}).then(console.log);
});
 
curl -X GET https://aniket.chat.convergenceservices.in/api/v1/users -u BOT_EMAIL_ADDRESS:BOT_API_KEY
You may pass the client_gravatar query parameter as follows:
curl -X GET https://aniket.chat.convergenceservices.in/api/v1/users?client_gravatar=true \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY
 
 
 
Arguments
Note: The following arguments are all URL query parameters.
  
    
      | Argument | Example | Required | Description | 
  
  | client_gravatar | true | No | The client_gravatarfield is set totrueif clients can compute their own gravatars.
Defaults tofalse. | 
Response
Return values
- members: A list of dictionaries where each dictionary contains information
  about a particular user or bot.- 
- email: The email address of the user or bot..
- is_bot: A boolean specifying whether the user is a bot or not.
- avatar_url: URL to the user's gravatar.- Noneif the- client_gravatarquery paramater was set to- True.
- full_name: Full name of the user or bot.
- is_admin: A boolean specifying whether the user is an admin or not.
- bot_type:- Noneif the user isn't a bot.- 1for a- Genericbot.- 2for an- Incoming webhookbot.- 3for an- Outgoing webhookbot.- 4for an- Embeddedbot.
- user_id: The ID of the user.
- bot_owner: If the user is a bot (i.e.- is_botis- True),- bot_owneris the email address of the user who created the bot.
- is_active: A boolean specifying whether the user is active or not.
- is_guest: A boolean specifying whether the user is a guest user or not.
 
Example response
A typical successful JSON response may look like:
{
    "members": [
        {
            "avatar_url": "https://secure.gravatar.com/avatar/818c212b9f8830dfef491b3f7da99a14?d=identicon&version=1",
            "bot_type": null,
            "email": "AARON@zulip.com",
            "full_name": "aaron",
            "is_active": true,
            "is_admin": false,
            "is_bot": false,
            "is_guest": false,
            "user_id": 1
        },
        {
            "avatar_url": "https://secure.gravatar.com/avatar/77c3871a68c8d70356156029fd0a4999?d=identicon&version=1",
            "bot_type": null,
            "email": "cordelia@zulip.com",
            "full_name": "Cordelia Lear",
            "is_active": true,
            "is_admin": false,
            "is_bot": false,
            "is_guest": false,
            "user_id": 3
        },
        {
            "avatar_url": "https://secure.gravatar.com/avatar/0cbf08f3a355995fa2ec542246e35123?d=identicon&version=1",
            "bot_type": null,
            "email": "newbie@zulip.com",
            "full_name": "New User",
            "is_active": true,
            "is_admin": false,
            "is_bot": false,
            "is_guest": true,
            "user_id": 24
        }
    ],
    "msg": "",
    "result": "success"
}