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

**URL:** <https://community.auth0.com/t/default-api-with-auto-generated-client-curl-401/57087>\
**Category:** Get Help\
**Tags:** token, access-token\
**Created:** [January 31, 2021, 10:10pm UTC](https://community.auth0.com/t/default-api-with-auto-generated-client-curl-401/57087 "2021-01-31T22:10:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gobelet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gobelet/32/12951_2.png) [@Gobelet](https://community.auth0.com/u/Gobelet)\
**Post date:** [January 31, 2021, 10:10pm UTC](https://community.auth0.com/t/default-api-with-auto-generated-client-curl-401/57087/1 "2021-01-31T22:10:39Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [February 2, 2021, 3:44pm UTC](https://community.auth0.com/t/default-api-with-auto-generated-client-curl-401/57087/3 "2021-02-02T15:44:02Z")

</div>

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?:

```auto
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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 17, 2021, 3:44pm UTC](https://community.auth0.com/t/default-api-with-auto-generated-client-curl-401/57087/4 "2021-02-17T15:44:49Z")

</div>

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