Can someone help me with file upload through OAuth2 to a Box app/account - provided the client id and client secret using python.
I tried with:
oauth2 = OAuth2(CLIENT_ID, CLIENT_SECRET, access_token=ACCESS_TOKEN)
client = Client(oauth2)
Soon I realized that the access token which was the developer token I generated from box website expires after an hour. After which I got:
boxsdk.exception.BoxOAuthException: Message: {"error":"unauthorized_client","error_description":"The grant type is unauthorized for this client_id"}So, what I think is I need to find a way to generate an access token dynamically and use it instead.
My requirement is that this python script executes every week and uploads a report file to the box account/app-whose client id-secret will be configured.
NOTE: This script will run in cron job in background. So, no interaction involved with user for password prompt, etc.
