Answer the question
In order to leave comments, you need to log in
Why doesn't python send messages to telegram?
There is the following code
def send_telegram(text: str):
token = token
url = "https://api.telegram.org/bot"
channel_id = channel_id
url += token
method = url + "/newpost"
r = requests.post(method, data={
"chat_id": channel_id,
"text": text
})
send_telegram("hello world!")
{"ok":false,"error_code":404,"description":"Not Found"}
Answer the question
In order to leave comments, you need to log in
What is the newpost method ?
Maybe you should use sendMessage ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question