"Default" API with auto-generated client - curl 401

Hi,

I’ve created a free account to test and have an overview on Auth0.
To do that I’ve simply created a new API.
From what I saw it automatically created a new client (test) for my API.

When I go on that client → “Quick start” there is a curl command generated. Each time I try to execute that command I receive {“error”:“access_denied”,“error_description”:“Unauthorized”}curl: (6) Could not resolve host: application"

I tried to add a new permission in the API but I have the same result.

Is there something special to do to use a “default” API with an auto-generated client ?

Regards,

1 Like

Hi @Gobelet,

Welcome to the Community!

The error curl: (6) Could not resolve host: application" is usually thrown by cURL if the provided URL can’t be resolved. Since cURL cannot resolve the host, it can’t communicate to your Auth0 tenant, so your settings should not be relevant to this error.

Does the curl look like this in the terminal?:

curl --request POST \
  --url https://YOUR_DOMAIN/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"YOUR_APP_CLIENT_ID","client_secret":"YOUR_APP_CLIENT_SECRET","audience":"YOUR_API_IDENTIFIER","grant_type":"client_credentials"}'

You may want to try this request in Postman

1 Like

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