box api error getting the access token: Invalid grant_type parameter or parameter missing

人盡茶涼 提交于 2019-12-04 14:34:45

I think you might try sending the grant_type=... in the request body, not as a query string.

Here's the documentation example for that particular request:

curl https://api.box.com/oauth2/token \
-d 'grant_type=authorization_code&code={your_code}&client_id={your_client_id}&client_secret={your_client_secret}' \
-X POST

I had been having this same problem and John's solution worked. Instead of including the parameters in the url as you do when getting the access code, you need to encode them as POST data.

I'm using the Postman add-in for Chrome and I enter the parameters in the lower Key-Value fields after clicking the x-www-form-urlencoded button.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!