Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using (var client = new HttpClient())
{
client.BaseAddress = new System.Uri("https://<your tenant>.auth0.com/");
var response = await client.PostAsync("oauth/token", new FormUrlEncodedContent(
new Dictionary<string, string>
{
{ "grant_type", "client_credentials" },
{ "client_id", "<client_id>" },
{ "client_secret", "<client_secret>" },
{ "audience", "https://<your tenant>.auth0.com/api/v2/" }
}
));
var content = await response.Content.ReadAsStringAsync();
var jsonResult = JObject.Parse(content);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.