{"id":37108329,"url":"https://github.com/pyed/telegram-bot-api","last_synced_at":"2026-01-14T13:00:05.149Z","repository":{"id":57589610,"uuid":"52549967","full_name":"pyed/telegram-bot-api","owner":"pyed","description":"Golang bindings for the Telegram Bot API","archived":false,"fork":true,"pushed_at":"2016-02-28T12:12:23.000Z","size":2030,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T17:31:56.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"go-telegram-bot-api/telegram-bot-api","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-25T19:11:25.000Z","updated_at":"2024-06-20T17:31:56.325Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pyed/telegram-bot-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pyed/telegram-bot-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Ftelegram-bot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Ftelegram-bot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Ftelegram-bot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Ftelegram-bot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyed","download_url":"https://codeload.github.com/pyed/telegram-bot-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyed%2Ftelegram-bot-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T13:00:04.599Z","updated_at":"2026-01-14T13:00:05.124Z","avatar_url":"https://github.com/pyed.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang bindings for the Telegram Bot API\n\n[![GoDoc](https://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api?status.svg)](http://godoc.org/github.com/go-telegram-bot-api/telegram-bot-api)\n[![Travis](https://travis-ci.org/go-telegram-bot-api/telegram-bot-api.svg)](https://travis-ci.org/go-telegram-bot-api/telegram-bot-api)\n\nAll methods have been added, and all features should be available.\nIf you want a feature that hasn't been added yet or something is broken,\nopen an issue and I'll see what I can do.\n\nAll methods are fairly self explanatory, and reading the godoc page should\nexplain everything. If something isn't clear, open an issue or submit\na pull request.\n\nThe scope of this project is just to provide a wrapper around the API\nwithout any additional features. There are other projects for creating\nsomething with plugins and command handlers without having to design\nall that yourself.\n\nUse `github.com/go-telegram-bot-api/telegram-bot-api` for the latest\nversion, or use `gopkg.in/telegram-bot-api.v1` for the stable build.\n\n## Example\n\nThis is a very simple bot that just displays any gotten updates,\nthen replies it to that chat.\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"gopkg.in/telegram-bot-api.v1\"\n)\n\nfunc main() {\n\tbot, err := tgbotapi.NewBotAPI(\"MyAwesomeBotToken\")\n\tif err != nil {\n\t\tlog.Panic(err)\n\t}\n\n\tbot.Debug = true\n\n\tlog.Printf(\"Authorized on account %s\", bot.Self.UserName)\n\n\tu := tgbotapi.NewUpdate(0)\n\tu.Timeout = 60\n\n\tupdates, err := bot.GetUpdatesChan(u)\n\n\tfor update := range updates {\n\t\tlog.Printf(\"[%s] %s\", update.Message.From.UserName, update.Message.Text)\n\n\t\tmsg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text)\n\t\tmsg.ReplyToMessageID = update.Message.MessageID\n\n\t\tbot.Send(msg)\n\t}\n}\n```\n\nIf you need to use webhooks (if you wish to run on Google App Engine),\nyou may use a slightly different method.\n\n```go\npackage main\n\nimport (\n\t\"gopkg.in/telegram-bot-api.v1\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tbot, err := tgbotapi.NewBotAPI(\"MyAwesomeBotToken\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tbot.Debug = true\n\n\tlog.Printf(\"Authorized on account %s\", bot.Self.UserName)\n\n\t_, err = bot.SetWebhook(tgbotapi.NewWebhookWithCert(\"https://www.google.com:8443/\"+bot.Token, \"cert.pem\"))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tupdates, _ := bot.ListenForWebhook(\"/\" + bot.Token)\n\tgo http.ListenAndServeTLS(\"0.0.0.0:8443\", \"cert.pem\", \"key.pem\", nil)\n\n\tfor update := range updates {\n\t\tlog.Printf(\"%+v\\n\", update)\n\t}\n}\n```\n\nIf you need, you may generate a self signed certficate, as this requires\nHTTPS / TLS. The above example tells Telegram that this is your\ncertificate and that it should be trusted, even though it is not\nproperly signed.\n\n    openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3560 -subj \"//O=Org\\CN=Test\" -nodes\n\nNow that [Let's Encrypt](https://letsencrypt.org) has entered public beta,\nyou may wish to generate your free TLS certificate there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyed%2Ftelegram-bot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyed%2Ftelegram-bot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyed%2Ftelegram-bot-api/lists"}