Skip to content

Instantly share code, notes, and snippets.

@passionsjin
Created June 21, 2021 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save passionsjin/697ea8909ec252096036f1a979f85d49 to your computer and use it in GitHub Desktop.
Save passionsjin/697ea8909ec252096036f1a979f85d49 to your computer and use it in GitHub Desktop.
Telegram Rest API (SendMessage)
def send_msg(msg):
req = requests.post(url=f'https://api.telegram.org/bot{token}/sendMessage',
json={'chat_id': chat_id,
'text': msg})
return req.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment