Registry / messaging / line-line-bot-sdk-go

line-line-bot-sdk-go

JSON →
library7.8.0+incompatiblegogounverified

Provides Go bindings for the LINE Messaging API to build chatbot applications.

go get github.com/line/line-bot-sdk-go
INSTALL
IMPORT
SIG · LINE-LINE-BOT-SDK-
L
line-line-bot-sdk-go
messaginggov7.8.0+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

linebot
github.com/line/line-bot-sdk-go

Basic LINE bot server that replies to messages.

package main import ( "log" "net/http" "github.com/line/line-bot-sdk-go/linebot" ) func main() { bot, err := linebot.New("YOUR_CHANNEL_SECRET", "YOUR_CHANNEL_ACCESS_TOKEN") if err != nil { log.Fatal(err) } http.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) { events, err := bot.ParseRequest(r) if err != nil { if err == linebot.ErrInvalidSignature { w.WriteHeader(400) } else { w.WriteHeader(500) } return } for _, event := range events { if event.Type == linebot.EventTypeMessage { if _, err = bot.ReplyMessage(event.ReplyToken, linebot.NewTextMessage("Hello!")).Do(); err != nil { log.Print(err) } } } }) log.Fatal(http.ListenAndServe(":8080", nil)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
7.8.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
line-line-bot-sdk-go — go get line-line-bot-sdk-go · libregistry