urequests - Error sending to Telegram bot
Posted: Sat Jan 15, 2022 6:21 pm
I've only recently gotten into ESPs and Micropython.
I want to send a message from ESP8266 (D1 Mini V3 NodeMCU ESP8266EX) to Telegram bot.
Sending the message with the ESP32 is successful.
The ESP8288 comes with the following error message:
Traceback (most recent call last):
File "<stdin>", line 17, in <module>
File "urequests.py", line 120, in post
File "urequests.py", line 62, in request
OSError: -40
Is there a solution for this problem or can't I send to the bot with esp8266?
I want to send a message from ESP8266 (D1 Mini V3 NodeMCU ESP8266EX) to Telegram bot.
Code: Select all
import urequests
.
.
.
urequests.post("https://api.telegram.org/bot" + botToken + "/sendMessage?chat_id=" + str(chatId) + "&text=" + text)
The ESP8288 comes with the following error message:
Traceback (most recent call last):
File "<stdin>", line 17, in <module>
File "urequests.py", line 120, in post
File "urequests.py", line 62, in request
OSError: -40
Is there a solution for this problem or can't I send to the bot with esp8266?