Revoke an access token or a refresh token.
Go
package main import( "context" polargo "github.com/polarsource/polar-go" "github.com/polarsource/polar-go/models/components" "log" ) func main() { ctx := context.Background() s := polargo.New() 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 } }
{}
access_token
refresh_token
Successful Response
The response is of type object.
object
Was this page helpful?