Skip to content

Instantly share code, notes, and snippets.

@Humayung
Created May 28, 2020 12:20
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 Humayung/0132bf670aabb3cf01571b4e01e4fcb3 to your computer and use it in GitHub Desktop.
Save Humayung/0132bf670aabb3cf01571b4e01e4fcb3 to your computer and use it in GitHub Desktop.
import requests
API_ENDPOINT = "https://api.telegram.org/botXXX:YYY/sendMessage"
message = input('Enter Message:')
data = {'chat_id' : 'zzzzzzzzzz',
'text' : message
}
r = requests.post(url = API_ENDPOINT, data = data)
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment