相关疑难解决方法(0)

通过curl将文件发送到电报bot api

我尝试过以下方法:

curl -F name=document -F upload=@<path_to_the_file> \ 
     -H "Content-Type:multipart/form-data" \ 
     "https://api.telegram.org/bot<token>/sendDocument?chat_id=<chat_id>"
Run Code Online (Sandbox Code Playgroud)

它回来了 {"ok":false,"error_code":400,"description":"[Error]: Bad Request: there is no document in request"}

我做错了什么?

是关于sendDocument方法的一些文档.

curl multipartform-data telegram-bot

2
推荐指数
1
解决办法
6054
查看次数

标签 统计

curl ×1

multipartform-data ×1

telegram-bot ×1