Node-telegram-bot-api: sendDocument via file id Does not Work

Created on 18 Feb 2017  路  1Comment  路  Source: yagop/node-telegram-bot-api

I'm Trying To Send a File With ID But does not Work For Some Files

bot.sendDocument(msg.chat.id, "BQADBAADFAADAllAUeZn_0YHHRjNAg");     //ok
bot.sendDocument(msg.chat.id, "http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf");//ok

bot.sendDocument(msg.chat.id, "BQADBAADAgAD8jBJUZjgAdwyxsADAg")  //  Not Ok

I Have This Error:

Unhandled rejection Error: 400 {"ok":false,"error_code":400,"description":"Bad Request: Wrong file identifier/HTTP URL specified"}
question

Most helpful comment

I Find My Awnser Here
Sending by file_id
file_id is unique for each individual bot and can't be transferred from one bot to another.

>All comments

I Find My Awnser Here
Sending by file_id
file_id is unique for each individual bot and can't be transferred from one bot to another.

Was this page helpful?
0 / 5 - 0 ratings