unauthorized_client Authentication Origin: Application & API OSI layer 7 · Application Last updated 15 Oct 2026

OAuth 2.0 Error: unauthorized_client (client not allowed to use this grant type)

The client exists, but isn’t allowed to use the requested flow (grant type or response type).

Exact message you may see Grant type not allowed for the clientThe client is not authorized to use the provided grant typeis not authorized for the grant type
Seen on: REST API

Meaning

Identity providers enable grant types per application: authorization_code, client_credentials, refresh_token, device_code, implicit. Auth0 says “Grant type 'X' not allowed for the client”, Okta “The client is not authorized to use the provided grant type”.

Common causes

  • Grant type not enabled for the app (client_credentials, password, refresh_token)
  • App type mismatch (SPA vs regular web vs native)
  • Implicit flow disabled

⚡ Quick fix

  1. Enable the grant type in the provider’s app settings
  2. Use the flow matching the app type (auth code + PKCE for SPAs/mobile)
  3. Create a machine-to-machine app for client_credentials

Detailed fix by platform

Shell

  1. curl -s -X POST https://auth.example.com/oauth/token -d grant_type=client_credentials -d client_id=$ID -d client_secret=$SECRET -d audience=https://api.example.com

How to diagnose

  1. Grant — Which grant type is sent?
  2. App settings — Allowed grants
  3. App type — SPA/native/M2M

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

401 — 401 Bearer error="invalid_token" (HTTP)401403 — 403 Bearer error="insufficient_scope" (HTTP)403AH00558 — Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name (Nginx / Apache)AH00558auth/account-exists-with-different-credential — Firebase Auth: account exists with a different credential (same email, other provider) (Google Cloud / Firebase)auth/account-exists-w…auth/popup-closed-by-user — Firebase Auth: auth/popup-closed-by-user / auth/popup-blocked / auth/cancelled-popup-request (Authentication)auth/popup-closed-by-…auth/unauthorized-domain — Firebase Auth: auth/unauthorized-domain — This domain is not authorized for OAuth operations for your Firebase project (Authentication)auth/unauthorized-dom…database flags — Cloud SQL: invalid database flag value / instance fails to restart after a flag change (Google Cloud / Firebase)database flagsdeleted_client — Google OAuth: Error 401: deleted_client — The OAuth client was deleted (Authentication)deleted_clientunauthori…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.