We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
DarioO
8 months agoNew member | Level 2
Using dropbox API from a scheduled Task: authenticating but NOT as a User
I need a job that moves 4 times a day files from a folder to dropbox and reading other files from another folder . Designin the architecture is not a problem. However I'm stuck with the API of dropbo...
- 8 months ago
DarioO If you only needed to list the contents of a folder by using a shared link to that folder, you could use /2/files/list_folder and /2/files/list_folder/continue with app authentication. That would involve sending an app key and secret on both calls, and the shared link in the "shared_link" parameter on the /2/files/list_folder call.
If you need to be able to move files in the account though, e.g., using /2/files/move_v2 or /2/files/move_batch_v2, you do need an access token for that account (instead of just the app key/secret), as that requires user authentication.
In order to get an access token for an account, you do need to process the app authorization flow for that account at least once. As Здравко mentioned though, you only need to do that once if you request "offline" access. Doing so would give you a refresh token, which doesn't expire, and which can be used programmatically and repeatedly, without the user manually re-authorizing the app each time, to get a new access token whenever needed. The new access tokens can then be used to perform more folder listing and move calls.
For more information on using this authorization functionality, refer to the following resources:
DarioO
New member | Level 2
That's exactly what I would prefer to avoid. If something wrong I need to get another "code" from user Login and put it on back again. I guess that's would never be possibile, and anyway the mulesoft connector is working with Basic credentials, how does that works?
Greg-DB
8 months agoDropbox Staff
DarioO If you only needed to list the contents of a folder by using a shared link to that folder, you could use /2/files/list_folder and /2/files/list_folder/continue with app authentication. That would involve sending an app key and secret on both calls, and the shared link in the "shared_link" parameter on the /2/files/list_folder call.
If you need to be able to move files in the account though, e.g., using /2/files/move_v2 or /2/files/move_batch_v2, you do need an access token for that account (instead of just the app key/secret), as that requires user authentication.
In order to get an access token for an account, you do need to process the app authorization flow for that account at least once. As Здравко mentioned though, you only need to do that once if you request "offline" access. Doing so would give you a refresh token, which doesn't expire, and which can be used programmatically and repeatedly, without the user manually re-authorizing the app each time, to get a new access token whenever needed. The new access tokens can then be used to perform more folder listing and move calls.
For more information on using this authorization functionality, refer to the following resources:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 30 seconds agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!