Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Get User Token for Slack API?

I made a new Slack App, got both my user token and bot token, and now my app can post messages as me. But what if I want this app to post messages as someone else from my team? How to get their token? Or where they can find it?

like image 993
Alex Rublev Avatar asked Apr 13 '20 08:04

Alex Rublev


1 Answers

Tokens in slack can only be retrieved from the your slack apps OAuth page. This cannot be done via the API. If you want to send the messages as another user what you need to do is:

  1. Create the a slack app using the users account.
  2. Assign the relevant permissions to the app.
  3. Install the app to your work space.
  4. Fetch the generated tokens from the OAUTH and permissions section.
like image 143
Caleb Njiiri Avatar answered Oct 18 '22 23:10

Caleb Njiiri