Go lang SDK: Cannot fetch token

Hello,

I’m using Auth0 GO SDK to perform some user management calls like create or update user.

I can instantiate management client without any issues.

options := management.WithClientCredentialsAndAudience("client_id", "client_sec", "aud")
m, err := management.New("domain_url", options)
if err != nil {
	log.Error().Msgf("failed to initialize Auth0 client: %s", err.Error())
	return nil, err
}

But when I try to use to make some API calls (like create user for instance), it returns the following error:

user := &management.User{
		Email:        &req.Email,
	}
err := m.User.Create(user)
Error message: failed to send the request: Post \"https://domain-url/api/v2/users\": oauth2: cannot fetch token: 404 Not Found\nResponse: Not found., Http status code: 500

Hey there!

In order to handle that most effectively can I ask you to raise it as a GitHub issue in the SDK repo so we can work on that directly with the repo maintainers? Once you have a link to it you can share it here so we can ping them.

Thanks. Created an issue: Management client fails to fetch access token · Issue #150 · auth0/go-auth0 · GitHub

1 Like

It turned out to be a config issue. SDK works as expected. Thanks.

1 Like

No worries! Glad you have figured it out!

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