Skip to main content
Question

Error generating access token

  • May 22, 2025
  • 1 reply
  • 17 views

Forum|alt.badge.img

I am currently receiving an error when trying to generate an access token via a custom application. My code has not changed and it has been working well for several years, but within the last two weeks I started getting {"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}, which has made it impossible to use my custom app. I am using the correct endpoint as well, https://api.box.com/oauth2/token. Is anyone else having this issue? Has anyone been able to find a workaround? 

1 reply

Forum|alt.badge.img

Per Box support, this issue was caused by a change on their end. When requesting the access the token, the header's content type must be set like 

    var headers = {
        'Content-Type': 'application/x-www-form-urlencoded'
    };
Hopefully this fixes things for anyone else experiencing this problem!