Using Python To Send Telegram Messages To Yourself (In A Few Lines Of Code)

Опубликовано: 22 Март 2026
на канале: Python With Liu
18,215
282

URL TO GET CHAT_ID:
url = f"https://api.telegram.org/bot{TOKEN}/getUpdates"

ULR TO ACTUALLY SEND TELEGRAM MESSAGE:
url = f"https://api.telegram.org/bot{TOKEN}/sendMessage?chat_id={chat_id}&text={message}"

My coding setup:
Logitech MX Master Mouse: https://amzn.to/3T6h2gm
magic keyboard: https://amzn.to/3P4aQV2
magic trackpad: https://amzn.to/4364sCn
twelve south magicbridge: https://amzn.to/3TnAhDK
Dell 34 Inch Curved USBC Monitor S3423DWC: https://amzn.to/3V9USwF
Ergotune Supreme V3: https://amzn.to/3T2ffcm
macbook pro: https://amzn.to/49VJYyy

Cheers