Код: Выделить всё
import requests
token = '123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI'
method = 'sendMessage'
myuserid = 1949275XX
response = requests.post(
url='https://api.telegram.org/bot{0}/{1}'.format(token, method),
data={'chat_id': myuserid, 'text': 'hello friend'}
).json()
print(response)
Что я делаю не так? Я получил myuserid, отправив /getid @myidbot, и получил свой токен от @BotFather
Подробнее здесь: https://stackoverflow.com/questions/411 ... -not-found
Мобильная версия