Hello Sir,
I have an issue while fetching folder from Box API.By using the below code the code below
var client = sdk.getBasicClient('ACCESS_TOKEN');
It is only working for one hour.After one hour the token is expire. For solving the above issue I am trying to use Curl API for getting request access token.But before I need acces token by follwing code.
curl -X POST https://api.box.com/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=[CLIENT_ID]' \
-d 'client_secret=[CLIENT_SECRET]' \
-d 'code=[CODE]' \
-d 'grant_type=authorization_code'
But here I need to get CODE programtically in node to fetch request acces token. Current If we are hitting url and fetch the code it is expiring in a second.
Please help me as soon as possible. Thank you in advance.