Go to https://slack.com/signin#/signin and sign in with your slack. Once you are sign in scroll to the bottom of the page and click on developers.
On the Developers page, click on Your apps in the menu found at the top right-hand side of the page. This will bring up a drop-down menu. Click on Create your First app.
This will take you to the Your Apps page. Click on Generate Token.
A pop up will appear, choose your workspace and click “Generate.”
Clicking this will take you back to the Apps page. There is a box that holds your API Token. Click copy and save this for future reference.