Slack. Web. Users. Profile
(SlackKit v1.0.0-alpha.0)
View Source
Summary
Functions
Retrieve a user's profile information, including their custom status.
Set a user's profile information, including custom status.
Functions
Retrieve a user's profile information, including their custom status.
API reference
Rate limit: Tier 4: 100+ per minute
Scopes:
- Bot token:
users.profile:read - User token:
users.profile:read
Optional Params
include_labels- Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended. ex:trueuser- User to retrieve profile info for
Errors the API can return:
user_not_found- Value passed foruserwas invalid.
See the Common Errors guide for errors returned by every Web API method.
Set a user's profile information, including custom status.
API reference
Rate limit: Tier 3: 50+ per minute
Scopes:
- User token:
users.profile:write
Optional Params
name- Name of a single key to set. Usable only ifprofileis not passed. Update one field at a time by passing the pair of argumentsnameandvalue. ex:first_nameprofile- Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters. You can update any of the following non-custom fields from theprofileobject within a Slackuserobject: ex:{ first_name: "John", ... }user- ID of user to change. This argument may only be specified by admins on paid teams. You can update any of the following non-custom fields from theprofileobject within a Slackuserobject:value- Value to set a single key to. Usable only ifprofileis not passed. Update one field at a time by passing the pair of argumentsnameandvalue. ex:John
Errors the API can return:
cannot_update_admin_user- Only a primary owner can update the profile of an admin.email_taken- email takeninvalid_emoji_not_allowed- Invalid emoji not allowed.invalid_ooo_message- Invalid Out of Office message.invalid_profile- Profile object passed in is not valid JSON (make sure it is URL encoded!).invalid_starts_with_at- Name cannot start with @.must_clear_both_status_text_and_status_emoji- Clearing the status requires setting bothstatus_textandstatus_emojito ''.name_not_allowed- name cannot contain URL.not_admin- Only admins can update the profile of another user. Some fields, likeemailmay only be updated by an admin.not_app_admin- Only team owners and selected members can update the profile of a bot user.partial_profile_set_failed- Failed to set user profile.permission_denied- Permission denied.profile_set_failed- Failed to set user profile.reserved_name- First or last name are reserved.sudo_required- Request requires sudo session.too_long- You attempted to set a custom status but it was longer than the maximum allowed, 100.username_same- Username is the same as the current username.
See the Common Errors guide for errors returned by every Web API method.