# Getting error for oauth/token. Grant type 'client\_credentials' not allowed for the client

**URL:** <https://community.auth0.com/t/getting-error-for-oauth-token-grant-type-client-credentials-not-allowed-for-the-client/123797>\
**Category:** Get Help\
**Tags:** grants, management-api\
**Created:** [December 28, 2023, 10:07am UTC](https://community.auth0.com/t/getting-error-for-oauth-token-grant-type-client-credentials-not-allowed-for-the-client/123797 "2023-12-28T10:07:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pythonsweng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pythonsweng/32/53543_2.png) [@pythonsweng](https://community.auth0.com/u/pythonsweng)\
**Post date:** [December 28, 2023, 10:07am UTC](https://community.auth0.com/t/getting-error-for-oauth-token-grant-type-client-credentials-not-allowed-for-the-client/123797/1 "2023-12-28T10:07:20Z")

</div>

I have create regular web application and I want to get the oAuth token from outh/token, for that purpose I have M2M app. and want to use that token in api/v2/users API. manuall token is working fine for api/v2/users API.  
but oAuth/token API is giving error  
error: “unauthorized\_client”  
error\_description: “Grant type ‘client\_credentials’ not allowed for the client.”  
error\_uri: “[Application Grant Types](https://auth0.com/docs/clients/client-grant-types)”

I don’t know why this error is coming, I’m using Nextjs and calling apis by fetch

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 6, 2024, 12:24am UTC](https://community.auth0.com/t/getting-error-for-oauth-token-grant-type-client-credentials-not-allowed-for-the-client/123797/3 "2024-01-06T00:24:49Z")

</div>

Hey there @pythonsweng welcome to the community!

At what point exactly are you getting this error?

Typically this error is spot on, that is whatever client is requesting the token using client credentials doesn’t support the grant type. Client credentials are only used for [confidential](https://auth0.com/docs/get-started/applications/confidential-and-public-applications#confidential-applications) applications like [M2M](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow).

---

<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:** [January 20, 2024, 12:25am UTC](https://community.auth0.com/t/getting-error-for-oauth-token-grant-type-client-credentials-not-allowed-for-the-client/123797/4 "2024-01-20T00:25:48Z")

</div>

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