telegram-more

Migrate from https://cmakerhk.wordpress.com/2018/11/06/more-on-telegram/


https://github.com/rahiel/telegram-send#installation
easy to use to send photoes, and text back to the telegram and also right-click send file to telegram

sudo pip install telegram-send

telegram-send --configure



#paste the token and enter the password from the app >> Done

apt-get moo | telegram-send –pre –stdin
telegram-send –image photo.jpg –caption “The Moon at night”
telegram-send –file document.pdf

Use inside python script
https://www.rahielkasim.com/telegram-send/docs/api/



https://github.com/dschep/ntfy
receive notification

pip install ntfy[telegram]

((Command not found –> not working


https://core.telegram.org/bots/samples


Example used: HTTPSRequest

/*
HTTP over TLS (HTTPS) example sketch

This example demonstrates how to use
WiFiClientSecure class to access HTTPS API.
We fetch and display the status of
esp8266/Arduino project continuous integration
build.

Limitations:
only RSA certificates
no support of Perfect Forward Secrecy (PFS)
TLSv1.2 is supported since version 2.4.0-rc1

Created by Ivan Grokhotkov, 2015.
This example is in public domain.
*/

telegram:
get Info of bot: https://api.telegram.org/bot/getme

SendMessage: http://api.telegram.org/bot/sendMessage?chat_id=&text=HelloFromESP8266

ReceiveMessage: https://api.telegram.org/bot/getUpdates

On the NodeMCU: Since it is HTTPS –> I cannot find a way to used it with AT COMMAND

Programming to NodeMCU:
HTTPSRequest:

–>fingerprint[] –> inside the Chrome –> certificate –> detail –> thumb print


telegram:
get Info of bot: https://api.telegram.org/bot/getme

SendMessage: http://api.telegram.org/bot/sendMessage?chat_id=&text=HelloFromESP8266

ReceiveMessage: https://api.telegram.org/bot/getUpdates

reply a message: /sendmessage?chat_id=1234567&text=yoyo&reply_to_message_id=454
sendphoto: –> get the file id first!!!
/sendphoto?chat_id=1234567&photo=AgADBQADxagxG6PpUVdHAwvYecQlGt2C-TIABAEAAwIAA20AA4XvAgABFgQ

Sendphoto with URL:
/sendphoto?chat_id=1234567&photo=https://www.canva.com/learn/wp-content/uploads/2018/11/best-free-stock-photos-tb-2640x1485.jpg

https://stackoverflow.com/questions/33126743/how-do-i-add-my-bot-to-a-channel
sendMessage?chat_id=@test&text=Testing%20if%20this%20works