Skip to main content
Question

followed the documentation , i'm getting error : 'Invalid grant_type issue...

  • May 21, 2025
  • 3 replies
  • 25 views

Forum|alt.badge.img

i'm trying to make a post request to get access token, but i still get this message :

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

 

the request:

 

$Client->post('https://api.box.com/oauth2/token', array(
'headers' =>
array('content-type' => 'application/x-www-form-urlencoded'),
'body' => 'grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&client_id=rgc#####&client_secret=MH########&assertion=eyJhbGciOiJ#####.#####.####')) 

 

why i'm still getting this message and what migh be the main cause for this issue? thank you.

3 replies

Forum|alt.badge.img

I know this is more than 1 year old, but did you get a resolution for this?

I'm getting the same error and doesn't matter what I try as grant_type I keep getting the same error


Forum|alt.badge.img

 We'll need a little bit more information to help debug the error. Can you please share the request your code generates including the request headers and body? Please remove your credentials before posting.


Forum|alt.badge.img

Is JWT  login working ? i'm getting still the same issue