server-sdk-go
server-sdk-go copied to clipboard
Webhooks in golang sdk
to receive a data from webhook , get this error invalid character '\x05' looking for beginning of value
authorization bearer token
please provide more details.. what are you trying to do.. which versions of the SDK and livekit-server, etc.
i'm trying to get data webhook
- sdk version : 1.5.10 ( "github.com/livekit/protocol/auth" )
- using live kit cloud
- already add webhook from dashboard
this is the code from documentation ( golang version ) import ( "github.com/livekit/protocol/auth" "github.com/livekit/protocol/livekit" "github.com/livekit/protocol/webhook" )
func ServeHTTP(w http.ResponseWriter, r *http.Request) { authProvider := auth.NewSimpleKeyProvider( apiKey, apiSecret, ) // event is a livekit.WebhookEvent{} object event, err := webhook.ReceiveWebhookEvent(r, authProvider) if err != nil { // could not validate, handle error return } // consume WebhookEvent }
and here the result invalid character '\x05' looking for beginning of value