How to connect the auth0 management api

Whether or not the connections described below need to be loaded for each transaction.

	management, err := management.New(
		management.WithClientCredentials(client, secret),

Is it a problem to call the connection every time?

Is there a problem of having too many connections?

Is it better to load them once and use them all?

Will there be any interruptions in the process?

Hi @seki.yoshitsugu,

Thanks for reaching out to the Auth0 Community!

I understand that you have some questions about using the Auth0 Management API with the Auth0 Go SDK.

You can certainly call the connection every time, and it shouldn’t be a problem. However, there isn’t a good reason to do so unless the access token you acquired has expired. Then you will need to make a fresh request for a new access token.

There is not usually a problem with making many requests, but it’s possible to be rate-limited if you exceed the number of requests you can make in an interval of time.

See Management API Endpoint Rate Limits and Authentication API Endpoint Rate Limits for more details.

Yes. In the Client Credentials Flow, it’s common to make one request with the client_credentials grant type to obtain an access token, which can be used to query the Management API until expiry.

This may happen if your access token has expired. Then, you’ll not be able to make requests to the Management API.

Please let me know if there are any other questions or concerns.

Thank you.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.