Created an app in developer console. Using that access token from that app to upload/download files from box. But, the access token expires every 60 mins and I want to generate the access token every 59 mins and use it for my command to upload/download files. I'm trying to use the below command to generate the access token:
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
The output of the command says that "{"error":"invalid_client","error_description":"The client credentials are invalid"}". I am using the client_id and client_secret from the app that I created. your_code in the above command is my old Access token I hope. I'm not sure what I'm missing here. Do I need to use the refresh token to generate Access token? if so, how should I get refresh token in command line?
