You must enable javascript in order to use the Slack API Documentation. You can do this in your browser settings.
Go to Slack

user type

A user object contains information about a member.

{
    "ok": true,
    "user": {
        "id": "W012A3CDE",
        "team_id": "T012AB3C4",
        "name": "spengler",
        "deleted": false,
        "color": "9f69e7",
        "real_name": "Egon Spengler",
        "tz": "America/Los_Angeles",
        "tz_label": "Pacific Daylight Time",
        "tz_offset": -25200,
        "profile": {
            "avatar_hash": "ge3b51ca72de",
            "status_text": "Print is dead",
            "status_emoji": ":books:",
            "real_name": "Egon Spengler",
            "display_name": "spengler",
            "real_name_normalized": "Egon Spengler",
            "display_name_normalized": "spengler",
            "email": "spengler@ghostbusters.example.com",
            "image_24": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_32": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_48": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_72": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_192": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "image_512": "https://.../avatar/e3b51ca72dee4ef87916ae2b9240df50.jpg",
            "team": "T012AB3C4"
        },
        "is_admin": true,
        "is_owner": false,
        "is_primary_owner": false,
        "is_restricted": false,
        "is_ultra_restricted": false,
        "is_bot": false,
        "is_stranger": false,
        "updated": 1502138686,
        "is_app_user": false,
        "has_2fa": false,
        "locale": "en-US"
    }
}

The id field is a string identifier for this team member. It is only unique to the workspace/team containing the user. Use this field instead of the name field when storing related data or when specifying the user in API requests. Though the ID field usually begins with U, it is also possible to encounter user IDs beginning with W. We recommend considering the string an opaque value. Read more about recent changes to user ID strings.

The name parameter indicates the username for this user, without a leading @ sign.

The function of usernames is fundamentally changing. To best prepare for an eventual future where usernames do not exist, focus on the display_name in profile instead to address a user and always identify them by their id and team_id.

For deactivated users, deleted will be true.

The color field is used in some clients to display a colored username.

The profile hash contains as much information as the user has supplied in the default profile fields: first_name, last_name, real_name, display_name, email, skype, and the image_* fields. Only the image_* fields are guaranteed to be included. Email address access may require additional OAuth scopes.

display_name_normalized and real_name_normalized filter out any non-Latin characters typically allowed in display_name and real_name.

Data that has not been supplied may not be present at all, may be null or may contain the empty string (""). A user's custom profile fields may be discovered using users.profile.get.

The image_* fields will always contain https URLs to square, web-viewable images (GIFs, JPEGs or PNGs).

The updated field is a unix timestamp when the user was last updated.

The has_2fa field describes whether two-step verification is enabled for this user. This field will always be displayed if you are looking at your own user information. If you are looking at another user's information this field will only be displayed if you are Workspace Admin or owner.

The two_factor_type field is either app or sms. It will only be present if has_2fa is true.

Bot users may contain a always_active field under profile, indicating whether the bot user is active in a way that overrides traditional presence rules. The presence docs tell the whole story.

Those users with a provided timezone will have populated tz, tz_label, and tz_offset fields. tz provides a somewhat human readable string for the geographic region like "America/Los_Angels". tz_label is a string describing the name of that timezone (like "Pacific Standard Time"). tz_offset is a signed integer indicating the number of seconds to offset UTC time by.

Read about the new locale attribute here.

Enterprise Grid user objects

Users belonging to an Enterprise Grid workspace have a enterprise_user node attached containing these fields:

  • id - this user's ID, which might start with U or W; IDs beginning with U are unique only to a workspace. IDs beginning with W are unique for an entire Enterprise Grid organization and may represent the user on multiple workspaces within it.
  • enterprise_id - the unique ID for this particular Enterprise Organization
  • enterprise_name - the name of this umbrella organization
  • is_admin - a boolean value indicating whether this user administers this enterprise
  • is_owner - a boolean value indicating whether this user is the owner of this enterprise
  • teams - an array of team IDs within the containing enterprise that the user is a member of

Some enterprise grid users also have a kind of dual identity — a local team-centric user ID beginning with U as well as a enterprise wide user ID beginning with W, called the enterprise user ID.

In most cases these IDs can be used interchangeably but we strongly prefer using the enterprise user ID whenever possible.

See our Enterprise grid documentation for more detail.

User objects from workspaces connected through shared channels

Shared channels may contain channel members from multiple workspaces. Your app can retrieve information about these users using users.info and other API Methods. When a user belongs to a different workspace than the workspace/team associated with your app's token, they will have an is_stranger attribute set to true.

Users that are not "strangers" or from a foreign workspace will either have is_stranger set to false or the attribute omitted entirely.