我尝试过以下方法:
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方法的一些文档.