-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Labels
Description
System Informations
- Go version: 1.16.3
- OS: MacOSX 10.15.7
Expected Behavior
Endpoint and active information can be get by using GetWebhookInfo().
Current Behavior
Failed to unmarshal json string.
Steps to Reproduce
- example code
package main
import (
"fmt"
"log"
"os"
"github.com/line/line-bot-sdk-go/linebot"
)
func main() {
bot, err := linebot.New(
os.Getenv("LINE_CHANNEL_SECRET"),
os.Getenv("LINE_CHANNEL_TOKEN"),
)
if err != nil {
log.Fatal(err)
}
webhook_info, err := bot.GetWebhookInfo().Do()
if err != nil {
log.Fatal(err)
}
fmt.Println(webhook_info.Endpoint)
fmt.Println(webhook_info.Active)
}Logs
2021/04/17 12:05:49 json: cannot unmarshal bool into Go struct field WebhookInfoResponse.active of type string
exit status 1