Hi I would like to update profile information of my slack account using API. I don't find any API on their documentation. Do they have any API to update profile information?
See the screenshot http://screencast.com/t/f7eoAKT0Yy
Yes, they do.
But it's an undocumented API method. It's called users.profile.set
. So far I used it to change first- and last name, but other attributes should work too.
The basic syntax is:
users.profile.set?token=XXX&user=U12345678&profile=NEWPROFILE
NEWPROFILE
is a placeholder for the new profile for the user in JSON format, but you only need to specify the attributes you want to change, e.g. profile={"first_name":"John"}
will change the first name to John.
Check out my documentation on github for details and other undocumented methods in the Slack API.
Update November 2018
user.profile.set is now an official API method. However, you need to be on a paid team to use it for other users (not yourself). Although you can check this answer for a workaround.
users.setPhoto will allow you to change the profile picture. but only for your own user / token.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With