One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
gbc04
2 years agoExplorer | Level 3
Folder searches using the API often fail.
I created a function to download data files at the desired time by searching folders by date in a program (C#) through App Key (OAuth 2) and used it for several years.
However, from 09-12 to the 12th, the folder list could not be viewed, but from 09-18, access was possible from the 12th to the 18th.
After that, it suddenly showed up on 10-04 from the 1st to the 4th, and has not worked again until now (10-05).
I can view it through the Dropbox program, but why can't I access it only through the API?
Is there any workaround for this?
- Greg-DB
Dropbox Staff
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the full text of any error or unexpected output
- gbc04Explorer | Level 3
* SDK information is [Official Dropbox .Net v2 SDK v5.0.7591]
* Source Code
using (var dbx = new DropboxClient(Program.ConfigIni.BaseInfo.DropBoxApiTokenKey))
{
string DownForderName = "/" + Program.ConfigIni.BaseInfo.ServerOpenPath;
var aData = await dbx.Files.ListFolderAsync(DownForderName);//When loading here, only part of the folder information is displayed, but all is displayed in the dropbox program.
var list = aData.Entries.OrderBy(x => x.Name).ToArray();//show folders then files
foreach (var item in list.Where(i => i.IsFolder))
{
IsActivce = true;
string FileFullPath = "";
FileFullPath = item.Name;var ForderInFiles = await dbx.Files.ListFolderAsync(DownForderName + "/" + item.Name);
foreach (var Files in ForderInFiles.Entries.Where(i => i.IsFile))
{
~~~
}
}
}- ЗдравкоLegendary | Level 20
gbc04 wrote:...
var aData = await dbx.Files.ListFolderAsync(DownForderName);//When loading here, only part of the folder information is displayed, but all is displayed in the dropbox program.
var list = aData.Entries.OrderBy(x => x.Name).ToArray();...
Hi gbc04,
How many are all files/folders in the folder, that's object of listing/enumeration? Keep in mind that 'ListFolderAsync' only starts the listing (and possibly completes it when short enough). Its result is the first page from the result and eventually the only, but may be more pages! There is a flag that shows whether are more pages or just received page is the last - you never checked it in your code. When there are more pages, you have to continue pagination to the last one - something you skipped.
Hope this gives direction.
About Discuss Dropbox Developer & API
Make connections with other developers807 PostsLatest Activity: 2 hours 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!