POST
/
v1
/
oauth2
/
register
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.Clients.Create(ctx, components.OAuth2ClientConfiguration{
        RedirectUris: []string{
            "https://inferior-chainstay.com",
        },
        ClientName: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Any != nil {
        // handle response
    }
}
"<any>"

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Body

application/json

Response

200
application/json
Successful Response

The response is of type any.