https://github.com/halink0803/telegram-go-example
Example to interact with telegram api using golang
https://github.com/halink0803/telegram-go-example
go telegram telegram-api
Last synced: 8 months ago
JSON representation
Example to interact with telegram api using golang
- Host: GitHub
- URL: https://github.com/halink0803/telegram-go-example
- Owner: halink0803
- License: mit
- Created: 2019-02-04T10:48:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:40:22.000Z (over 2 years ago)
- Last Synced: 2025-03-16T04:26:00.723Z (over 1 year ago)
- Topics: go, telegram, telegram-api
- Language: Go
- Size: 169 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telegram-go-example
Example to interact with telegram api using golang
# Install dependencies
*This example is for running on Mac OS, for other os please refer to official [docs](https://github.com/tdlib/td#features)*
```shell
brew install gperf cmake openssl
```
**install tdlib**
```
git clone git@github.com:tdlib/td.git
cd td
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..
cmake --build .
make install
```
# Get api_id, api_hash
- Log in to your Telegram core: https://my.telegram.org.
- Go to ‘API development tools’ and fill out the form.
- You will get basic addresses as well as the api_id and api_hash parameters required for user authorization.
# Build example
Using your api_id and api_hash you get above to fill in the code and run. Using get_chats.go to get chat ids, use those id to fill in send_message.go to run send message example.