cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I write a client program to access a shared folder?

How do I write a client program to access a shared folder?

bingwu123
Explorer | Level 4

Hello -

I am new to Dropbox API/client programming. I was able to get a basic program running. It access a folder owned by someone else but is shared with me. However, at the moment, I have to get an access token from the developer API portal everytime I ran the program. I am wondering what is the proper design to build a permenant solution?

Here is more details

  • A coworker shared a Dropbox Paper Business folder with me
  • I need to upload some files, via a client program (not manually), at the end of a batch job
  • I created an App, got a permenant access token. By default, the client program can only access the folders created under the "App/app_name" directory. At least that is what I know
  • What do I need to do, so that my App can write to the shared folder? Assuming I cannot rename/re-locate the said folder
  • If this is not the right approach, what's the alternative?

 

Thanks,

 

1 Accepted Solution

Accepted Solutions

Re: How do I write a client program to access a shared folder?

Greg-DB
Dropboxer

It sounds like you've registered an API app with the "app folder" permission. Currently, app folders are incompatible with shared folders, meaning you can't share an app folder, put a shared folder inside an app folder or put an app folder in a shared folder.

Instead, if you need to use the API to access a shared folder, you'll need to use "full Dropbox" permission, as opposed to the app folder permission. 

Since you've already registered an app using the app folder permission, you can register another with the full Dropbox permission here.

Once you've done so, you can get an access token for your account for that new app like you did for the old app, and use the new access token to access the shared folder in your account. You can store and re-use the access token so you don't have to retrieve a new one each time.

You may also want to check out the Content Access Guide and Namespace Guide for more context on how the Dropbox file system works with the API.

View solution in original post

2 Replies 2

Re: How do I write a client program to access a shared folder?

Greg-DB
Dropboxer

It sounds like you've registered an API app with the "app folder" permission. Currently, app folders are incompatible with shared folders, meaning you can't share an app folder, put a shared folder inside an app folder or put an app folder in a shared folder.

Instead, if you need to use the API to access a shared folder, you'll need to use "full Dropbox" permission, as opposed to the app folder permission. 

Since you've already registered an app using the app folder permission, you can register another with the full Dropbox permission here.

Once you've done so, you can get an access token for your account for that new app like you did for the old app, and use the new access token to access the shared folder in your account. You can store and re-use the access token so you don't have to retrieve a new one each time.

You may also want to check out the Content Access Guide and Namespace Guide for more context on how the Dropbox file system works with the API.

View solution in original post

Re: How do I write a client program to access a shared folder?

bingwu123
Explorer | Level 4

Thanks! Works like a charm.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    bingwu123 Explorer | Level 4
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?