You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
VikasGarg_cs
6 years agoExplorer | Level 3
Cannot access dropbox account using access Token generated by a different account
I have given an appkey to access a dropbox app, I create an authorize url using this -
Uri authorizeUri = DropboxOAuth2Helper.GetAuthorizeUri(OAuthResponseType.Token, AppKey, RedirectUri, state: o...
Greg-DB
Dropbox Staff
Each Dropbox API access token is specific to a particular app-user pair, and enables access to that particular account to the extent allowed by the app's access type (a.k.a. "permission"). For example, if the app is registered for the "app folder" permission, it will only be able to access the contents of the app folder created for the app in that user's account.
By default, app folders are created at "/Apps/<app folder name>". When using an access token for an app with the app folder permission though, the app should not include the "/Apps/<app folder name>" part of the path in paths it sends to the API. Dropbox will automatically interpret paths as being inside the app folder.
Also, note that each account gets its own app folder when it connects to an app with the app folder permission. App folders for the same app do not sync their contents across different accounts.
If you're making an API call and are getting a 'not_found' error, it indicates that there isn't anything at the "path" you supplied in the connected account. You should check what path you actually meant to specify, and send the correct value instead.
It may help to use the ListFolderAsync/ListFolderContinueAsync methods to list the root first, by supplying a path of "" (the empty string).
VikasGarg_cs
6 years agoExplorer | Level 3
Thanks for the quick response.
Here is my understanding -
1. Each dropbox account generate its own access token.
2. Each dropbox account will create its own folder under the "Apps/<App Folder name>"
3. Different accounts cannot access each other folder
3. Account folders cannot communicate/synch with each other.
Now let me explain you my scenario -
1. There is one parent company who created an App with App folder permission with folder say Apps/InputData
2. Another company will be uploading the files from their application to the InputFolder as mentioned above <Not sure how they will do that as I don't connect with them>
3. My job is to connect to the dropbox copy the uploaded file to the local folder, read/process the information uploaded.
Now the question is if they are uploading to a different folder which i cannot read then how to achieve this.
Thanks
- Greg-DB6 years agoDropbox Staff
With an access token for an app folder in a particular account, you can access anything in that app folder. You will need to specify the correct path though. A 'not_found' error indicates that you're not specifying the correct path. You cannot access anything outside that app folder though.
I recommend first using the ListFolderAsync/ListFolderContinueAsync methods to list the root of the app folder, by supplying a path of "" (the empty string). The result will show you the contents of the app folder (if any), including the path value for each item inside it. You can then use the paths for the files/folders in the app folder to access them.
If they did not upload files inside the app folder, you'll need to either have them move the files into the app folder manually, or switch to an API app with the "full Dropbox" permission. Unlike apps with the "app folder" permission, apps with the "full Dropbox" permission can access anything in the connected Dropbox account.
- VikasGarg_cs6 years agoExplorer | Level 3Thanks Greg.
I figured based on your response that path not found is coming due to the fact that I uploaded the files from different account/apptoken and downloading the files from different account/apptoken.
As you mentioned that different account will have separate folder there for no possibility if communication with folder access permissions.
I need to request full dropbox access and try that out today.
Further the folder contents Api you mentioned I already check earlier but the folder, files were different therefore cannot relate them.
I will try full dropbox access app and update you on that.
Thanks- VikasGarg_cs6 years agoExplorer | Level 3
I tried drobox app with full dropbox permission. Given below are my findings -
Admin/Owner of the dropbox uploaded the files to the 'Apps/Input' folder manually with thier own account and from the dropbox web interface.
I have given with the appkey of the new dropbox app as mentioned above.
Now, I generated an app Token using my own dropbox account for the above app and tried reading the files and found that I cannot access the files uploaded by owner with my app Token, regardless I use full dropbox or folder only permission.
Seems like If 3 different people wants to read/write same folder in a dropbox app then app Key/Token has to be same/shared among all i.e. this is only possible with same appToken used for read/write/access.
What I can do is create a folder outside an App, this folder to be shared among 3 parties as shared folder. Now each one of us can view/read/write this folder in our own dropbox. Further this folder is accessible to everyone. I tested this and this seems to be working.
Thanks.
Vikas Garg
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 31 minutes ago
If 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!