Overview
The simplest possible Gogram example - authenticate and send a message to yourself (Saved Messages).Code
How It Works
- Create Client - Initialize a new Telegram client with your API credentials from my.telegram.org
- Authenticate - Login as a bot using the token you got from @BotFather
- Send Message - Send “hello world!” to your Saved Messages (use
"me"as the chat identifier)
Running the Example
- Replace
YOUR_APP_HASHwith your actual API hash - Replace
YOUR_BOT_TOKENwith your bot token from @BotFather - Run the program:
- Check your Saved Messages in Telegram to see “hello world!”
Next Steps
Echo Bot
Build a bot that responds to messages
Authentication
Learn more about authentication