The first_name and last_name fields can be up to 35 characters each. The name slackbot cannot be used for either of these fields.
The email field must be a valid email address. It cannot have spaces, and it must have an @ and a domain. It cannot be in use by another member of the same team. Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot to the user informing them of the change. This field can only be changed for users on paid teams.
After March 20, 2017 the skype field will always be an empty string and cannot be set otherwise. For more detail, please read this changelog entry.
The fields key is an array of key:value pairs holding the values for the user's custom profile fields. The key is the ID of the definition for that field, which is per-team. This ID can also be used in the name field of this method. The value of a field is what should be displayed, unless the alt key is also present, in which case that is displayed instead. The value can be up to 256 characters for fields of type text and link. For fields of type options_list, the value must be one of the possible_values in the field definition. For fields of type date, the value must be a valid date. The alt field can be up to 256 characters for all field types. The profile argument must be used in order to set the alt field.
This method will generate a user_change event on success, containing the complete user.
This table lists the expected errors that this method could return.
However, other errors can be returned in the case where the service is down
or other unexpected factors affect processing. Callers should always
check the value of the ok params in the response.
First or last name are reserved.
Profile object passed in is not valid JSON (make sure it is URL encoded!).
Failed to set user profile.
Only admins can update the profile of another user.
Only team owners and selected members can update the profile of a bot user.
Only a primary owner can update the profile of an admin.
No authentication token provided.
Invalid authentication token.
Authentication token is for a deleted user or team.
This method cannot be called by a bot user.
The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.
The method was passed a PHP-style array argument (e.g. with a name like foo). These are never valid with the Slack API.
The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8iso-8859-1.
The method was called via a POST request with Content-Typeapplication/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.
The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/x-www-form-urlencodedmultipart/form-datatext/plain.
The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.
The team associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.
The method was called via a POST request, but the POST data was either missing or truncated.
This table lists the expected warnings that this method will return.
However, other warnings can be returned in the case where the service
is experiencing unexpected trouble.
The method was called via a POST request, and recommended practice for the specified Content-Type is to include a charset parameter. However, no charset was present. Specifically, non-form-data content types (e.g. text/plain) are the ones for which charset is recommended.
The method was called via a POST request, and the specified Content-Type is not defined to understand the charset parameter. However, charset was in fact present. Specifically, form-data content types (e.g. multipart/form-data) are the ones for which charset is superfluous.