Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
800 stars 340 forks source link

how to send document to bot #202

Closed mamalheydar closed 4 years ago

mamalheydar commented 4 years ago

i used this function and set this argument but get this error :

$content_document = array('chat_id' => $chat_id,'document'=>"https://www.tarakala.ir/bot_folder/files_chanel/111429973.txt");
                        $telegram->sendDocument($content_document);

my file exist on host but dont send to bot my error : error 400 Bad Request: wrong file identifier/HTTP URL specified

Eleirbag89 commented 4 years ago

From the Telegram doc:

In sendDocument, sending by URL will currently only work for gif, pdf and zip files.