Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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