POST
/
v1
/
oauth2
/
revoke
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
    }
}
{}

Body

application/x-www-form-urlencoded
token
string
required
client_id
string
required
client_secret
string
required
token_type_hint
enum<string> | null
Available options:
access_token,
refresh_token

Response

200 - application/json
Successful Response

The response is of type object.