【发布时间】:2021-02-04 18:25:24
【问题描述】:
您好,我想通过telegram API 向我的机器人发送照片,我必须使用 API URL 发送并且不能使用库。
我试过了:
token = " "
chat_id = " "
pic = ("C:\\Windows\\pic\\hello.jpg")
url = requests.post("https://api.telegram.org/bot"+token+"/sendPhoto?chat_id="+chat_id+"&photo="+pic)
print(url)
结果:
{"ok":false,"error_code":400,"description":"Bad Request: wrong HTTP URL specified"}
【问题讨论】:
-
它对我有用,你到底是什么问题?
标签: api telegram telegram-bot