How to Get a Slack Token?
Fleeting- External reference: https://github.com/yuya373/emacs-slack#how-to-get-token
yuya373/emacs-slack: slack client for emacs
How to get token
- Using Chrome, open and sign into the slack customization page, e.g. https://my.slack.com/customize
- Right click anywhere on the page and choose “inspect” from the context menu. This will open the Chrome developer tools.
- Find the console (it’s one of the tabs in the developer tools window)
- At the prompt ("> “) type the following: console.log(“your api token is: “, TS.boot_data.api_token)
- Copy the displayed token elsewhere, and close the window.
- Using Chrome, open and sign into the slack customization page, e.g. https://my.slack.com/customize
- Right click anywhere on the page and choose “inspect” from the context menu. This will open the Chrome developer tools.
- Find the console (it’s one of the tabs in the developer tools window)
- At the prompt ("> “) type the following: window.prompt(“your api token is: “, TS.boot_data.api_token)
- Copy the displayed token elsewhere.
- If your token starts with xoxc then keep following the other steps below, otherwise you are done and can close the window.
- Now switch to the Applications tab in the Chrome developer tools (or Storage tab in Firefox developer tools).
- Expand Cookies in the left-hand sidebar.
- Click the cookie entry named d and copy its value. Note, use the default encoded version, so don’t click the Show URL decoded checkbox.
- Now you’re done and can close the window.
For further explanation, see the documentation for the emojme project: (github.com/jackellenberger/emojme)
Note that it is only possible to obtain the cookie manually, not through client-side javascript, due to it being set as HttpOnly and Secure. See OWASP HttpOnly.