# Unauthorized for oauth/token grant type password Native App

**URL:** <https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219>\
**Category:** Get Help\
**Tags:** user-password-management, user-management\
**Created:** [January 16, 2023, 4:03am UTC](https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219 "2023-01-16T04:03:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngthailam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ngthailam/32/42679_2.png) [@ngthailam](https://community.auth0.com/u/ngthailam)\
**Post date:** [January 16, 2023, 4:03am UTC](https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219/1 "2023-01-16T04:03:49Z")

</div>

Hi,

**Context**  
I am creating a Native App where we want to authorize user with our native login form. I successfully used the `dbconnections/signup` endpoint to create a new user.

**The problem:**  
For the `oauth/token` endpoint, I am getting

```auto
{
    "error": "access_denied",
    "error_description": "Unauthorized"
}

```

This is my cUrl ( this is a test app I created )

```auto
curl --location --request POST 'https://dev-uc7nx3l56liil03z.us.auth0.com/oauth/token' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Cookie: did=s%3Av0%3A55a459f0-9550-11ed-8ece-25f26b66f3fc.S%2BAunX5GHOL3qjtG7atjL3AR9QvMlQ7b%2B3LI%2BqCwVpI; did_compat=s%3Av0%3A55a459f0-9550-11ed-8ece-25f26b66f3fc.S%2BAunX5GHOL3qjtG7atjL3AR9QvMlQ7b%2B3LI%2BqCwVpI' \

--data-urlencode 'grant_type=password' \

--data-urlencode 'client_id=i89ZfhJY1fI4gVnbyjrn0ZBukxPucUfz' \

--data-urlencode 'username=xeixujocreke-1762@yopmail.com' \

--data-urlencode 'password=@Aab123456'

```

The `password` is the password I sent in the `dbconnections/signup`, and the `username` is the `email` since I didnt provide a custom username.

The Application type is Native Application, and I have checked, there’s no rules involved.

Can someone help me with this. Thanks

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 19, 2023, 5:59pm UTC](https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219/3 "2023-01-19T17:59:49Z")

</div>

Hi @ngthailam,

Welcome to the Auth0 Community!

After my investigation, I found that your Application (`i89ZfhJY1fI4gVnbyjrn0ZBukxPucUfz`) has not yet enabled the Password Grant-Type in the advanced settings:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/f/5f8702fd45d904b90ce0c5b10f89a1f13725aa51.png)

Given that, I recommend enabling the Password Grant-Type in your Application’s advanced settings for the Resouce Owner Password Grant flow to work properly.

See our [documentation](https://auth0.com/docs/get-started/applications/update-grant-types) on how to update your Application’s Grant Types.

Please let me know if you have any further questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ngthailam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ngthailam/32/42679_2.png) [@ngthailam](https://community.auth0.com/u/ngthailam)\
**Post date:** [January 31, 2023, 1:49am UTC](https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219/4 "2023-01-31T01:49:01Z")

</div>

Sorry for the late reply. We were celebrating Lunar new year in my country.

Thanks for the great help, I must have missed that. I’ve successfully managed to call the API successfully after your suggestion.

Nice to know the community blog is still managed and questions are answered.

Many thanks, keep up the good work.

---

<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 14, 2023, 1:49am UTC](https://community.auth0.com/t/unauthorized-for-oauth-token-grant-type-password-native-app/98219/5 "2023-02-14T01:49:26Z")

</div>

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