Sticker and custom emoji ID

A sticker is addressed by file_id, a custom emoji by custom_emoji_id. Both arrive in the update when someone sends one to a bot.

Steps

  1. Send the sticker or emoji to a bot

    A bot you created with @BotFather. For a custom emoji, send it inside a text message.

  2. Call getUpdates

    Run the command shown in the inspector.

  3. Read message.sticker

    file_id, set_name and — for custom emoji — custom_emoji_id. Emoji inside text are in message.entities.

A whole set at once

If you know the set's name (from its t.me/addstickers/… or t.me/addemoji/… link):

curl -s "https://api.telegram.org/bot$TOKEN/getStickerSet" \
  -d name=<set name>

The inspector reads that answer too.

getUpdates inspector

Paste what getUpdates returned (or a single update or message). Every ID in it is listed. Read in your browser — nothing is uploaded.

1 · Fetch your bot's updates in a terminal
TOKEN='paste-your-token-here'
curl -s "https://api.telegram.org/bot$TOKEN/getUpdates"

FAQ

How do I find a custom emoji ID?

Send a message containing the custom emoji to a bot and look at message.entities: the entity of type custom_emoji carries custom_emoji_id. A custom emoji sent as a sticker has it in message.sticker.custom_emoji_id.

Is a sticker file_id the same for every bot?

No. A file_id is only valid for the bot that received it. file_unique_id is the same for all bots but cannot be used to send the sticker.

How do I list all stickers of a set?

Call getStickerSet with the set's name (the part after t.me/addstickers/ or t.me/addemoji/). The answer lists every sticker with its file_id and, for emoji sets, custom_emoji_id.

Where can a bot use a custom_emoji_id?

In message entities of type custom_emoji, in getCustomEmojiStickers, as a forum topic icon and in a few other fields. Which bots may send custom emoji in messages is restricted by Telegram; see the Bot API documentation of MessageEntity.