Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save patilswapnilv/c20fa5398d537cf29e696fd7ac9cbce1 to your computer and use it in GitHub Desktop.
Save patilswapnilv/c20fa5398d537cf29e696fd7ac9cbce1 to your computer and use it in GitHub Desktop.
Download all of your Team's custom Slack emojis.
#!/bin/bash
# get a token from https://api.slack.com/custom-integrations/legacy-tokens
# or if you don't have permissions to create one, you can inspect the Slack web client and you can get the one it is using
SLACK_TOKEN=
curl -q -s "https://slack.com/api/emoji.list?token=$SLACK_TOKEN" | jq -Mr '.emoji | to_entries | .[] | select(.value | startswith("http")) | "\(.key) \(.value)"' | sort | while read name url; do
fn="$name.${url##*.}"
echo "$fn"
curl -q -s -o "$fn" "$url"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment