I have been trying since the morning but earlier there were errors, so i had the direction but now there is no error and even not a warning too..
How code looks like :
import requests
def send_msg(text):
token = "TOKEN"
chat_id = "CHATID"
url_req = "https://api.telegram.org/bot" + token + "/sendMessage" + "?chat_id=" + chat_id + "&text=" + text
results = requests.get(url_req)
print(results.json())
send_msg("hi there 1234")
What is expected output : It should send a text message
What is the current output : It prints nothing
It would be great help is someone helps, Thank you all
Edit : 2
As the below dependancies were not installed, it was not capable of sending the text .
$ pip install flask
$ pip install python-telegram-bot
$ pip install requests
Now can somebody help me with sendPhoto please? I think it is not capable of sending image via URL, Thank you all
**Edit 3 **
I found a image or video sharing url from here but mine image is local one and not from the remote server
bot.sendPhoto(chat_id, 'URL')
to send photos. – Picard