Download custom Slack Emoji, without admin access


browse  log 



You can also use your local clone with git send-email.

#Download custom Slack emoji without admin access

You'll need the Cookie header, and the slack token to download the list of emoji. To get those, run the Slack team in a web browser. Open up the network panel, open the emoji panel and do a search. You'll see a POST request to something like: https://edgeapi.slack.com/cache/<TEAM_ID>/emojis/search. Inspect that request, note these values as environment variables in your shell:

  • SLACK_TEAM_ID: The TEAM_ID in the search url
  • SLACK_TOKEN: The POST body has a token with some dashes
  • SLACK_COOKIE: The POST headers will have a Cookie header. You need the long header value only, not the whole header.
  • SLACK_PLATFORM: Optional. apple or google. Defaults to apple
    • This is because some emoji have platform-specific variants. Setting this variable sets which platform image to download.

You can set these like so:

export SLACK_TOKEN="xoxc-xxxxxx-xxxxxx"
export SLACK_COOKIE="x=l8f8gls55xf; foo=...; bar=..."
export SLACK_PLATFORM="apple"

Then run the script:

ruby fetch_emoji.rb

First it downloads the list of all the emoji files. Then each emoji image. Emojis will download to a directory named downloads. All emoji aliases are skipped.