Konubinix' opinionated web of thoughts

How to Get a Slack Token?

fleeting

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.

https://github.com/yuya373/emacs-slack#how-to-get-token

  1. Using Chrome, open and sign into the slack customization page, e.g. https://my.slack.com/customize
  2. Right click anywhere on the page and choose “inspect” from the context menu. This will open the Chrome developer tools.
  3. Find the console (it’s one of the tabs in the developer tools window)
  4. At the prompt ("> “) type the following: window.prompt(“your api token is: “, TS.boot_data.api_token)
  5. Copy the displayed token elsewhere.
  6. If your token starts with xoxc then keep following the other steps below, otherwise you are done and can close the window.
  7. Now switch to the Applications tab in the Chrome developer tools (or Storage tab in Firefox developer tools).
  8. Expand Cookies in the left-hand sidebar.
  9. 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.
  10. 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.

https://github.com/yuya373/emacs-slack#how-to-get-token