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

gilbertwulff's avatar
gilbertwulff
Explorer | Level 3
8 years ago

Why are the ids different?

Im trying to use a shared folder link from a user to determine which folder they want us to upload a file into.


Why are the ids different for the same folders when I get folder metadata from the GetSharedLinkMetadataAsync method and the id that i get from the ListFolderAsync method?

 

I'm sure its the same folder. Is there another api call that i can use to get the shared folder id (from the shared folder link) or at least the same id?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    It sounds like the link was created by a different user than the one you're making these API calls for. In that case, the id on the link will be different than the id of the folder in the user's account. (Technically, this is because the id for the folder in the user's account is for the location in their own account where the shared folder is mounted, not the shared folder.)

    Unfortunately I don't believe there's a good way to solve this using the link. Can you get the shared folder ID from the originating user in the first place instead?
    • gilbertwulff's avatar
      gilbertwulff
      Explorer | Level 3

      Thanks Greg. And no we wont be able to get the shared folder id from the originating user unless there is a way for us to grab that from the website? 

       

      The reason why we're doing this is so that we can link a particular folder that was shared to us to specific users. Any suggestion from you on how we can tackle this?

       

      Right now i'm trying to use the id from the shared file metadata api and compare it to a list of folder ids i have in my dropbox account

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        No, unfortunately you can't get the shared folder ID from a shared link for the folder using the API or from the website. Further, you can't actually guarantee that the user is giving you the correct link anyway, or that you were actually invited to the shared folder for the shared link they gave you.

         

        Instead, you might want to call /2/sharing/list_mountable_folders[/continue] to list the shared folders that have been shared with you that you haven't mounted yet. (Or /2/sharing/list_folders[/continue] for those that you did mount.) You can also then call /2/sharing/list_folder_members[/continue] to see what other users are members of them.