package main
import(
"context"
"os"
polargo "github.com/polarsource/polar-go"
"github.com/polarsource/polar-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := polargo.New(
polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
)
res, err := s.Oauth2.Revoke(ctx, components.RevokeTokenRequest{
Token: "<value>",
ClientID: "<id>",
ClientSecret: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.RevokeTokenResponse != nil {
// handle response
}
}