We are actively builidng a Box Integration. Developed a custom-application
to use Authentication as OAuth2.0
.
We have added multiple web-integrations and everything works as expected.
When Any action is triggered from
Box-Cloud
using a Web-Integration
– We use theauthCode
to generate the access-token with NodeSdk.
– We perform the required task and Workflow is Completed without any issues.
We are storing {access_token, refresh_token, ttl}
in our backend database…
The Problem is when we Try to refresh the Token:
- The Refresh Token is used for the first time.
- The Refresh Token is not expired (I tested within few minutes, after getting the refresh-token).
- I tried using the Authentication flo:
Contructing AuthenticationUrl
,Allow Access from BOX
,Exchange Code for Token
. etc. It also failed when I try to Refresh the Token. - I tried using
CURL
,POSTMAN
andNODE-SDK
. Everything is throwing the same error related to"Invalid-grant"
“invalid_grant”, “Invalid grant_type parameter”, etc
Tried using Node-Sdk - Response Error Obeject.
Tried using Curl
Tried using Postman APIs Provided by BOX:
I have used the following documentation as a reference:
- https://developer.box.com/guides/tooling/postman/refresh/
- https://developer.box.com/guides/authentication/tokens/refresh/
- https://developer.box.com/guides/authentication/oauth2/with-sdk/
Please help me understand what am missing here.
We are stuck with this issue and development is blocked. Any help is highly appreciated.
Thanks,
Sarin