Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any slack API to update profile information?

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

like image 668
rajuniit Avatar asked Sep 21 '15 12:09

rajuniit


1 Answers

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.

like image 117
Erik Kalkoken Avatar answered Oct 20 '22 22:10

Erik Kalkoken