hello all, had a question on using the ory API cli...
# ory-network
q
hello all, had a question on using the ory API client. I am trying to recreate this flow https://www.ory.sh/docs/oauth2-oidc/custom-login-consent/flow but in go. I see there’s setup js code like this:
Copy code
const ory = new OAuth2Api(
  new Configuration({
    basePath: `https://${process.env.ORY_PROJECT_SLUG}.<http://projects.oryapis.com|projects.oryapis.com>`,
    accessToken: process.env.ORY_API_KEY,
  }),
)
and this golang SDK seems to be the one to use for that code: https://github.com/ory/client-go but when I use the
NewAPIClient
method it asks for a
Configuration
object which doesn’t have a base path or access token. I feel like I’m just looking in the wrong place…anyone know what the issue is?
to whom it may concern
Copy code
ory.NewAPIClient(&ory.Configuration{
	DefaultHeader: map[string]string{
		"Authorization": "Bearer " + oryKey,
	},
	Servers: []ory.ServerConfiguration{
		{
			URL: oryURL,
		},
	},
})