Skip to main content
Question

The grant type is unauthorized for this client_id

  • May 22, 2025
  • 1 reply
  • 19 views

Forum|alt.badge.img

Can anyone help me with why I'm receiving response The grant type is unauthorized for this client_id' when I am trying to get an access token for an API call.

 

curl -s -X POST https://api.box.com/oauth2/token

-d grant_type=authorization_code

-d code=

-d client_id=

-d client_secret=

 

Using OAuth2 with JWT for authentication have successfully retrieved the authentication code.  

 

My client is set to 'enterprise' and has 'generate user access tokens' enabled.  Also client id and client secret are correct.

 

Any help will be gratefully received.

 

 

1 reply

Forum|alt.badge.img

 The authorization_code grant type is only used for standard (non-JWT) OAuth2 — the instructions for making the correct token request can be found at https://developer.box.com/docs/construct-jwt-claim-manually#section-step-5-construct-the-oauth2-request