Get own user

Get basic data about the user/bot that requests this endpoint.

GET https://openpl.zulipchat.com/api/v1/users/me

Usage examples

#!/usr/bin/env python3

import zulip

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

# Get the profile of the user/bot that requests this endpoint,
# which is `client` in this case:
result = client.get_profile()
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(async (client) => {
    // Get the profile of the user/bot that requests this endpoint,
    // which is `client` in this case:
    return await client.users.me.getProfile();
}).then(console.log).catch(console.err);

curl -sSX GET -G https://openpl.zulipchat.com/api/v1/users/me \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

This endpoint takes no parameters.

Response

Return values

  • avatar_url: URL for the user's avatar.

    Changes: New in Zulip 2.1.0.

  • avatar_version: Version for the user's avatar. Used for cache-busting requests for the user's avatar. Clients generally shouldn't need to use this; most avatar URLs sent by Zulip will already end with ?v={avatar_version}.

    Changes: New in Zulip 3.0 (feature level 10). Previous versions do not return this field.

  • email: Email of the requesting user.

  • full_name: Full name of the requesting user.

  • is_admin: A boolean indicating if the requesting user is an admin.

  • is_owner: A boolean indicating if the requesting user is an organization owner.

    Changes: New in Zulip 3.0 (feature level 8).

  • is_guest: A boolean indicating if the requesting user is a guest.

    Changes: New in Zulip 3.0 (feature level 10). Previous versions do not return this field.

  • is_bot: A boolean indicating if the requesting user is a bot.

  • is_active: A boolean specifying whether the user account has been deactivated.

    Changes: New in Zulip 3.0 (feature level 10). Previous versions do not return this field.

  • timezone: The time zone of the user.

    Changes: New in Zulip 3.0 (feature level 10). Previous versions do not return this field.

  • date_joined: The time the user account was created.

    Changes: New in Zulip 3.0 (feature level 10). Previous versions do not return this field.

  • max_message_id: The integer ID of the last message received by your account.

    Deprecated. We plan to remove this in favor of recommending using GET /messages with anchor="newest".

  • user_id: The user's ID.

  • delivery_email: The user's real email address. This field is present only if email address visibility is limited and you are an administrator with access to real email addresses under the configured policy.

  • profile_data: A dictionary containing custom profile field data for the user. Each entry maps the integer ID of a custom profile field in the organization to a dictionary containing the user's data for that field. Generally the data includes just a single value key; for those custom profile fields supporting Markdown, a rendered_value key will also be present.

    • '{id}': Object with data about what value user filled in the custom profile field with id id.

      • value: User's personal value for this custom profile field.

      • rendered_value: The value rendered in HTML. Will only be present for custom profile field types that support Markdown rendering.

        This user-generated HTML content should be rendered using the same CSS and client-side security protections as are used for message content.

Example response

A typical successful JSON response may look like:

{
    "avatar_url": "https://secure.gravatar.com/avatar/af4f06322c177ef4e1e9b2c424986b54?d=identicon&version=1",
    "avatar_version": 1,
    "date_joined": "2019-10-20T07:50:53.728864+00:00",
    "email": "iago@zulip.com",
    "full_name": "Iago",
    "is_active": true,
    "is_admin": true,
    "is_bot": false,
    "is_guest": false,
    "is_owner": false,
    "max_message_id": 30,
    "msg": "",
    "profile_data": {
        "1": {
            "rendered_value": "<p>+1-234-567-8901</p>",
            "value": "+1-234-567-8901"
        },
        "2": {
            "rendered_value": "<p>Betrayer of Othello.</p>",
            "value": "Betrayer of Othello."
        },
        "3": {
            "rendered_value": "<p>Apples</p>",
            "value": "Apples"
        },
        "4": {
            "value": "emacs"
        },
        "5": {
            "value": "2000-1-1"
        },
        "6": {
            "value": "https://zulip.readthedocs.io/en/latest/"
        },
        "7": {
            "value": "[10]"
        },
        "8": {
            "value": "zulip"
        }
    },
    "result": "success",
    "timezone": "",
    "user_id": 5
}