I'm trying to send an animated GIF with sendPhoto (Telegram's Bot API) with this request:
https://api.telegram.org/bot<token>/sendPhoto?chat_id=<chat_id>&photo=http://i.giphy.com/13IC4LVeP5NGNi.gif
That method works, as in, I get ok:true
back, but the image in the chat window is a still snapshot of the moving GIF.
How can I get the animated GIF to show? Is there another method I should use?
Type @gif in the message field and hit Space on your keyboard. This will bring up a pop-up menu of GIFs, and the message field will now read "Search GIFs." This way, you can quickly search and send GIFs in a chat by using the message field as a search box.
Sending GIFs To make sending your favorite animations easier, we've added a dedicated GIF tab to the sticker panel. Tap on GIFs in chats (long tap on iOS) and 'Save' to add them to the panel. Then send them to any chat in one tap.
Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a local photo by passing a file path. (Optional). Photo caption (may also be used when re-sending photos by file_id), 0-1024 characters.
You should use the sendAnimation method for sending a GIF or H.264/MPEG-4 AVC video without sound.
Just use the animation
parameter for your GIF file.
sendPhoto
is only used for static images.
use sendVideo method!
https://api.telegram.org/bot<token>/sendVideo?chat_id=<chat_id>&video=http://i.giphy.com/13IC4LVeP5NGNi.gif
this will work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With