Cannot get access token for brand new default API

I’m brand new to Auth0 and just created an API through the Dashboard with all default settings.

Auth0 automatically generated a client application to test my API.

I made sure the test client application was enabled.

Trying to get an access token for the test client application (almost) never works, resulting instead in BadRequest responses.

From the Quick Start section in the dashboard for the test client application, I tried:

  • cURL
  • C# (which was outdated for .NET 6, btw)

From the documentation (Call Your API Using the Client Credentials Flow), I tried the C# example (form-encoded instead of json), which also didn’t work.

From PostMan, I tried a basic JSON POST, which DID work.

Why does it work in PostMan with all default settings, and nowhere else? Particularly, why doesn’t it work for any of the various examples that you provide in your documentation and Dashboard Quick Starts?

Hi @michael-bamboo,

Welcome to the Auth0 Community!

I understand that you are trying to make requests to your API using the Client Credentials Flow.

First, I would like to emphasize that the error you are encountering is likely due to the content-type header in the request.

In this case, I suggest looking at this related community thread on the solution.

Please let me know if you have any questions.

Thank you.