Skip to main content
Question

API v2 - Invalid grant_type requesting token

  • May 22, 2025
  • 2 replies
  • 3 views

Forum|alt.badge.img

I am following the steps from OAuth 2.0 box guide (https://box-content.readme.io/docs/oauth-20).

First I authorize my application using this URL:

 

 

https://account.box.com/api/oauth2/authorize?response_type=code&client_id=&redirect_uri=http://localhost:8081/callback&state=security_token 

Then, I request the token to https://api.box.com/oauth2/token using this body.

 

 

 

{
  "grant_type": "authorization_code",
  "code": "",
  "client_id": "",
  "client_secret": ""
}

The code is the same as the first step return me at the URL.

But I always get the same error:

 

{
    "error": "invalid_request",
    "error_description": "Invalid grant_type parameter or parameter missing"
}

What can solve that problem?

 

2 replies

Forum|alt.badge.img

 could you please provide your applications client ID and a date/time/timezone you received this error so I can take a closer look on the backend? 

 

As a friendly reminder, please do not post sensitive data (like a client secret) in a public forum. We have gone ahead and redacted the previously provided information. A client ID is okay to share though! 


Forum|alt.badge.img

Hi ,

The client ID is:

yl2x0xadk4hadfvb7ind5myzdwey9nn3

And the date/time/timezone: 18:42 (CET) Spain Time at 20/01/2019.

Thanks for the recommendation. However, the request data was changed (Some characters).

Regards,

everuser.