Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
My case is this. Our company will generates files that we pass off to another company for processing (printing, specifically). These files are not really big, say less than 100M each, PDFs. Up to now this pass-off process has been "manual": we generate the files with a script, then upload them to a folder shared from the 2nd company, in our Dropbox account. The whole arrangement has been pretty informal, just personal use Dropbox accounts on our end.
We now want to automate the passing-off of the files. I have been working on code to do this and it works, but not quite. I started by creating an app for my account. I scoped the app to a specific folder. I can upload files via API call with the app credentials (token) no problem. However, the files need to get dropped in the 2nd company's shared folder. (1) I tried moving the shared folder into the app scoped folder, but that is not allowed. (2) I then tried a different app, scoped to my entire Dropbox account (not scoped to the folder), so I could put files into the shared folder; but when I did this I got a "missing scope" error, with the scope "files.content.write" required. However, for the app I did turn this permission on. I imagine it has to do with my app somehow not having permission to the 2nd company's shared folder, although I don't know.
So I'm not sure how to do this. I recognize that I am possibly doing it all wrong. It occurred to me that the 2nd company might need to be the one to create an app in their Dropbox and give us the app credentials or whatnot, but as I said, this is pretty informal and I'd like to keep this 2nd company's setup in their account for our needs to an absolute minimum. Hopefully I just missed something in the above that will get this to work for us?
Thanks in advance for help.
As you found, app folders are incompatible with shared folders, meaning you can't share an app folder, put a shared folder inside an app folder or put an app folder in a shared folder. Instead, if you need to use the API with shared folders, you'll need to use "full Dropbox" permission, as opposed to the app folder permission. You can find more information about app permissions here.
Using full Dropbox access, you certainly should be able to programmatically access a shared folder in your connected account. A 'missing_scope' error indicates though just indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. Be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens.
That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope.
As you found, app folders are incompatible with shared folders, meaning you can't share an app folder, put a shared folder inside an app folder or put an app folder in a shared folder. Instead, if you need to use the API with shared folders, you'll need to use "full Dropbox" permission, as opposed to the app folder permission. You can find more information about app permissions here.
Using full Dropbox access, you certainly should be able to programmatically access a shared folder in your connected account. A 'missing_scope' error indicates though just indicates that while the app is permitted to use that scope, the particular access token you're using to make the API call does not have that scope granted. Be aware that just adding a scope to your app via the App Console does not retroactively grant that scope to existing access tokens.
That being the case, to make any API calls that require that scope, you'll need to get a new access token with that scope.
Hi there!
If you need more help you can view your support options (expected response time for a 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!