I investigated whether Slack has an API endpoint for adding Custom Emoji and found /api/emoji.add, but it appears not to be publicly available.
You can set Custom Emoji permissions from https://your.slack.com/admin/settings#customization, but it wasn’t possible to grant permission to Guests as well, so I thought “Can’t we add Custom Emoji via the Slack API?” and decided to investigate.
There was an open GitHub issue requesting permission to use the API /api/emoji.add with xoxb tokens.
Although /api/emoji.add is not a publicly available API, there were examples like slack-emojinator that scrape and use xoxs tokens.
upload.py#L21 · smashwilson/slack-emojinator
The xoxs token scraping was handled by the _fetch_api_token method implemented in the following location:
upload.py#L81-L94 · smashwilson/slack-emojinator
That’s all from the Gemba, where we want to add Custom Emoji via the Slack API.