Telegram, getting file_id for existing sticker

大憨熊 提交于 2019-12-05 00:51:47

To discover a sticker's file_id:

  1. Send the sticker from Telegram App to your bot.

  2. Use the bot's getUpdates method to receive the sticker. You should see the sticker's file_id in the message.

Your bot may use that file_id to send the same sticker to another user. Be careful; in the message there is a thumb field, which also has a file_id. Do not use that one to send the sticker. It won't work.

Another possibility, of which you may be aware, is that you can always download the sticker image to a disk file, then use that file as the sticker parameter for sendSticker method, equivalent to uploading the file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!