Hello
I set webhook and let telegram send me an update by http post method.
I want to get document which is sent by user as below with API controller:
[HttpPost]
public async Task<IHttpActionResult> post(Update update)
{
NetTelegramBotApi.Types.File sFile = await bot.MakeRequestAsync(new GetFile(update.Message.Document.FileId));
System.Net.WebClient webclient = new System.Net.WebClient();
var tempfilename = System.IO.Path.GetTempFileName();
webclient.DownloadFile(sFile.FileDownloadUrl, tempfilename);
return Ok();
}
And i get "Request failed (status code 400): Bad Request: wrong persistent file id" error.
I check these codes in Console Application program,They work fine. But in WEBHOOK mode all Message.Document's properties return empty value.
Is there any bug in API, or I made a wrong code?
Hello I set webhook and let telegram send me an update by http post method. I want to get document which is sent by user as below with API controller:
And i get "Request failed (status code 400): Bad Request: wrong persistent file id" error. I check these codes in Console Application program,They work fine. But in WEBHOOK mode all Message.Document's properties return empty value. Is there any bug in API, or I made a wrong code?