Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 605 Bytes

USAGE.md

File metadata and controls

31 lines (26 loc) · 605 Bytes
package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}