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

YanivB's avatar
YanivB
Helpful | Level 6
11 months ago

SwiftyDropbox - retrieve the paths of all files and folders in the root directory

Hi all, 

I need help, I have set the SwiftyDropbox SDK in my IOS project, and I am able to do the OAuth process successfully :



and i get my dropbox account info when i ask the API:


I have problem retrieve the paths of all files and folders in my dropbox root directory....
I used this code:

And i get this response :

0 entries.... 
What am I doing wrong, as i have in my dropbox root a lot of folders and files...... ?





  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Hi YanivB,

    Is it certain that the response you got comes from the code you think? 🤔 It doesn't look so (there are some differences). Make it sure. Wipe out of your code all similar looking functions that may be called by mistake instead of the target one (or make their names significantly different so to be difficult make mistake). 😉

    Good luck.

    • YanivB's avatar
      YanivB
      Helpful | Level 6

      I dont see any mistake .....

      1. The dropboxOAuth() func, returned me the Token i need for later use.
      That is working and I can re-Auth with that Token later.

      2. The getCurrentAccountDropboxInfo()func, also working as i am getting all my account info when I run it.

      3. What i have problems is the listFilesInRootDropbox()func....as its working but I got this response (which doest make sense to me as I expected to get the list of all my folders and files in the the Root of my Dropbox folder.....:

       



       

       




       

      • Здравко's avatar
        Здравко
        Legendary | Level 20

        Hm... 🤔 Ok, but the result gets printed out from "line 3177" on one side and code you show appears on "line 322"on other side. Isn't a bit strange? 🧐

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,888 PostsLatest Activity: 2 days ago
327 Following

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!