BOX Standard OAuth 2.0 - Unable to get access & refresh token using AUTHORIZE/TOKEN APIs
Hi, I am using Standard OAuth 2.0 (User Authentication) in my box app. It was working fine. But now I am unable get access & refresh token with AUTHORIZE & TOKEN API. Below are steps I followed but I got error in return.
Step 1: As explained in https://developer.box.com/reference#authorize
https://account.box.com/api/oauth2/authorize?response_type=code&client_id=<MY_CLIENT_ID>&redirect_uri=<MY_REDIRECT_URL>&state=<MY_SECURITY_TOKEN>
It works fine and returns "code=" in redirect uri. I am using the same "code" in below call.
Step 2: As explained in https://developer.box.com/reference#token
curl https://api.box.com/oauth2/token \
-d 'grant_type=authorization_code' \
-d 'code=' \
-d 'client_id=' \
-d 'client_secret=' \
-X POST
It returns below response. I checked in postman with encoded content-type header but it returns same response.
{"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}
I would really appreciate if anyone could help me to figure it out? Thanks in advance.
Please sign in to leave a comment.
Comments
1 comment