We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
If you need to use webhooks (if you wish to run on Google App Engine), you may use a slightly different method.
package main import ( "log" "net/http" "github.com/go-telegram-bot-api/telegram-bot-api" ) func main() { bot, err := tgbotapi.NewBotAPI("MyAwesomeBotToken") if err != nil { log.Fatal(err) } bot.Debug = true log.Printf("Authorized on account %s", bot.Self.UserName) _, err = bot.SetWebhook(tgbotapi.NewWebhookWithCert("https://www.google.com:8443/"+bot.Token, "cert.pem")) if err != nil { log.Fatal(err) } updates := bot.ListenForWebhook("/" + bot.Token) go http.ListenAndServeTLS("0.0.0.0:8443", "cert.pem", "key.pem", nil) for update := range updates { log.Printf("%+v\n", update) } }