Hello, I have written a backup solution and want to automatically post the backup file (a zip) to my Dropbox account every day when backup finishes.
How can I create an auth2 token by code and use it to post my file?
I have solved the issues around posting the file, but I have not figured out how to automatically create the auth2 token. I can only generate demo tokens valid for 24 hours but I need the ability to at any time generate the token automatically based on the app key/secret for my account.
I have tried "converting oauth1 to oauth2" using
curl -X POST https://api.dropboxapi.com/2/auth/token/from_oauth1 \
--header "Authorization: Basic xxxx" \
--header "Content-Type: application/json" \
--data "{\"oauth1_token\":\"<token>\",\"oauth1_token_secret\":\"<token security>\"}"
but any combination of the data I have available generate errors.
Please provide an explanation in detailed steps how to accomplish this by automation (http requests etc).
Thanks!