I am trying to send a html document to a bot using requests
in python.
url = 'https://api.telegram.org/bot******/sendDocument'
response = requests.post( url = url,
data = { 'chat_id' : chat_id,
'document': open('/home/user/page.html', 'rb'),
}
)
I get <Response [400]>
. I followed this link and able to post html document to the bot using curl
but not using requests
.
What am I doing wrong here.