We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
acschg
6 months agoExplorer | Level 4
Restore (inadvertently) deleted folder associated with Dropbox App
Hello,
I'm seeking help with a recent problem that has arisen with an App (built on the Dropbox .NET SDK, running as a part of cloud-hosted Windows Service, and using a long-lived refresh token...
- 6 months ago
The Dropbox API and the Dropbox web site both use the same filesystem data, so it's not expected that you'd see a different state (e.g., deleted or not deleted) for the same item at the same time across the two interfaces. Can you double check you're looking at the same item in both places? For instance, you can call GetCurrentAccountAsync to check which account you're connected to on the API, and use the account drop-down menu in the top right to see which account you're signed in to on the web site.
Keep in mind that app folders are unique to each app-account pair. Different apps in the same account would have different app folders, and the same app connected to multiple accounts would have a separate app folder for each account.
In any case, while you can't restore an entire folder and its contents using the API, you can create a folder at a path using CreateFolderV2Async, and restore any specific desired file (e.g., under that path) using RestoreAsync. And while the Dropbox API doesn't offer an API call to return information about which app folder it's operating in (since apps with the app folder access type aren't supposed to be able to access any information above the root of their app folder), creating a folder would be a good way to test which app folder you're connected to (e.g., when comparing to the web site).
Greg-DB
Dropbox Staff
The Dropbox API and the Dropbox web site both use the same filesystem data, so it's not expected that you'd see a different state (e.g., deleted or not deleted) for the same item at the same time across the two interfaces. Can you double check you're looking at the same item in both places? For instance, you can call GetCurrentAccountAsync to check which account you're connected to on the API, and use the account drop-down menu in the top right to see which account you're signed in to on the web site.
Keep in mind that app folders are unique to each app-account pair. Different apps in the same account would have different app folders, and the same app connected to multiple accounts would have a separate app folder for each account.
In any case, while you can't restore an entire folder and its contents using the API, you can create a folder at a path using CreateFolderV2Async, and restore any specific desired file (e.g., under that path) using RestoreAsync. And while the Dropbox API doesn't offer an API call to return information about which app folder it's operating in (since apps with the app folder access type aren't supposed to be able to access any information above the root of their app folder), creating a folder would be a good way to test which app folder you're connected to (e.g., when comparing to the web site).
acschg
6 months agoExplorer | Level 4
Thanks, Greg-DB, your suggestions helped me resolve the issue.
Specifically, I discovered that the Dropbox account that was being used at runtime for the App was the "wrong" account in that it was not the account used to create the App. Presumably, this occurred because the API calls to generate an offline refresh token were done from this "wrong" account rather than the intended one.
Having determined and corrected this, then we used the API call to recreate the deleted App folder.
All is functioning correctly now, and I have a better understanding of the relationship between Dropbox accounts and Apps and their associated folders.
Thanks again.
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 5 days 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!