Forum Discussion

DevDood's avatar
DevDood
New member | Level 2
2 years ago

Share my folder contents with employees in a restricted area of my website

All I want to do is share a folder with employees in a password restricted area of our website.  I want them to be able to read/write to this folder.  I'm using PHP and can get it to do what I need it to when I'm logged in to my primary (paid) account, but in testing on other devices realized it's only listing contents from the currently logged in user's account, plus, the Oauth flow is requiring people to log in to Dropbox...

 

While I thought I had successfully accomplished this using the /2/files/list_folder endpoint, it turns out if I'm logged in to another Dropbox account it won't list the folder from the primary account that the app is assigned to.

 

How can I accomplish this?  Is there a way I can do it without my employees having to create Dropbox accounts?  When I try the traditional "share" methods, DB wants other employees to also pay for DB even though my primary account is paid for (we have a lot of data).

 

I've tried the embed tool, too, but every subfolder we click on gives the error "Owner hasn't granted you access to this link".  There's also no option to upload with the embed tool.  I'd rather not have my employees all create DB accounts; this just creates more steps and I just need them to be able to access some files and occasionally send photos from their phones.

 

Is Google Drive a better option for this?

  • DevDood's avatar
    DevDood
    New member | Level 2

    To follow up, I was able to successfully get the embedder to work as needed by using /2/sharing/create_shared_link_with_settings which generated a url that worked with the embedder.

     

    The "Owner hasn't granted you access to this link" error I was getting was because I was using an "edit" link instead of a "view" link.

    At this point I'm able to get my app to work the way I need to without requiring users to log in to Dropbox.  I'll have to come up with another solution to allow users to upload images.

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

      Thanks for following up. I'm glad to hear you already got the Dropbox Embedder working.

       

      To allow users to upload files to your account, check out the "file requests" feature.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 days ago
351 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!