Hi all,
Some info about my setup first. Working with a Blazor server-side application, running asp.net core 5.0, with latest version of the Auth0 SDK installed. What I am running into and having problems with is requesting an access token to use with the management API.
Current code:
string auth0Domain = "https://dev-qoess5ks.us.auth0.com/";
var auth0AuthenticationClient = new AuthenticationApiClient(
new Uri(String.Format("https://{0}", auth0Domain)));
var tokenRequest = new ClientCredentialsTokenRequest()
{
ClientId = "myID",
ClientSecret = "mySecret",
Audience = String.Format("https://{0}/api/v2/", auth0Domain),
};
var tokenResponse =
await auth0AuthenticationClient.GetTokenAsync(tokenRequest); // this is where my application times out, not sure if it means incorrect credentials or what.
return tokenResponse.AccessToken;
}
Just to check, I am inputting the ClientID and ClientSecret of the ManagementAPI correct? Not that of my current application? I have tried both and come to no avail.
Thanks for your help!