Backing up Slackmojis

Recently a slack instance I’m on broke through the 11,000 slackmoji barrier. Given this was a significant usage of people’s time I figured it was worth backing these up in case of a disaster

To the docs!

Slack document an API which returns all slackmoji names and the URL of their images which are accessible without authentication.

Given this it should be pretty easy to download them all.


This code downloads several images a second, and is deliberately unthreaded because this is slow enough not to trigger a rate limit.

Sample code

Please only use this for innocent fun, where you have permission as you are downloading data from the instance.

This snippet is provided under an MIT license and I hold no responsibility for how you choose to use it.

import http.client, urllib.parse, json, urllib.request, shutil, glob

# Replace
# TOKEN with your bearer token like xoxc-
# COOKIE with your browser cookies, you can get this from the network tab
# FOLDER with the full path that you want the slackmojis to be backed up in

conn = http.client.HTTPSConnection("")

folder = "FOLDER"

headers = { "Content-type": "application/json; charset=utf-8", "Authorization": "Bearer TOKEN", "cookie": "COOKIE"}

conn.request("GET", "/api/emoji.list",  headers=headers)

response = conn.getresponse()

jsonRepr = json.loads(

for emojiname, url in jsonRepr["emoji"].items():
    filename = f"{emojiname}.{url.split('.')[-1]}"

    if "alias" in url:
        # Ignoring aliases for now
    with urllib.request.urlopen(url)  as u:
        with open(f"{folder}/{filename}", 'bw+') as f:

Copyright © 2024 Richard Finlay Tweed. All rights reserved. All views expressed are my own