cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you’ve changed your email address, now's the perfect time to update it on your Dropbox account and we’re here to help! Learn more 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: 

Dropbox API question

Dropbox API question

Fire_walker
Explorer | Level 4
Go to solution

Hi,

 

I have a .Net application running on client's machines and would like to add some functionality to the application that would enable uploading of files from the client side.

 

1) Through my application (linked to the API) can I create a shared folder (client specific) on the client's machine and then choose files to be sent to the shared folder which are then uploaded to my dropbox account as soon as the internet connection is available? Its only a one way communication the files are only uploaded from the client's machine to my account.

2) Does the client's machine require a dropbox account?

3) What do I need to setup such communication?

4) Is there a limit on the number of client uploads or my dropbox space is the only limitation?

 

thanks,

2 Accepted Solutions

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

1) Yes, using the Dropbox API, you can create, share, and upload files to folders. For .NET, we recommend using the official Dropbox API v2 .NET SDK. In this case, it sounds like you'll want to:

- use ShareFolder to create/share a folder

- use AddFolderMember to invite another user to the shared folder

- use Upload to upload files to the shared folder

 

2) A Dropbox account is necessary for interacting with the Dropbox API, e.g., to upload files. Note that the computer doesn't need the official Dropbox desktop client application installed though. When you use the Dropbox API, you are commuicating directly with the Dropbox servers.

 

3) In this case I recommend using the official Dropbox API v2 .NET SDK. There are instructions there for installing it.

 

4) In addition the standard space quota you mentioned, the Dropbox API does have a rate limiting system, based on the rate of API calls (not bandwidth). It is only designed to prevent abuse though, and is relatively very generous. Further, the limits operate on a per-user basis. Also, note that some Dropbox Business plans do have a monthly limit on the number of upload API calls they can make.

View solution in original post

Greg-DB
Dropbox Staff
Go to solution
All API calls (e.g., creating a shared folder, inviting members, and uploading files) can be run automatically without manual user intervention.

The only part that requires manual user intervention is authorizing the app itself, via the OAuth 2 app authorization flow. Once that's done though, the resulting access token can be stored and re-used without further manual intervention.

Note that your app does need to be running in order to issue the calls though.

Also, it sounds like you may want to be able to issue these while offline. The Dropbox API operates by having your app communicate directly with the Dropbox servers, so you need an Internet connection to make the calls. If you don't have a connection, you can queue the calls up, but this isn't something that the API/SDK offers for you; you'd need to build that in to your own logic. Alternatively, you could require that the official Dropbox desktop client application be installed, and then just write the files to the local Dropbox folder. The official Dropbox desktop client application installed would then upload the files when online. Note that we don't offer an official interface for this though. You'd just be interacting with the local filesystem.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

1) Yes, using the Dropbox API, you can create, share, and upload files to folders. For .NET, we recommend using the official Dropbox API v2 .NET SDK. In this case, it sounds like you'll want to:

- use ShareFolder to create/share a folder

- use AddFolderMember to invite another user to the shared folder

- use Upload to upload files to the shared folder

 

2) A Dropbox account is necessary for interacting with the Dropbox API, e.g., to upload files. Note that the computer doesn't need the official Dropbox desktop client application installed though. When you use the Dropbox API, you are commuicating directly with the Dropbox servers.

 

3) In this case I recommend using the official Dropbox API v2 .NET SDK. There are instructions there for installing it.

 

4) In addition the standard space quota you mentioned, the Dropbox API does have a rate limiting system, based on the rate of API calls (not bandwidth). It is only designed to prevent abuse though, and is relatively very generous. Further, the limits operate on a per-user basis. Also, note that some Dropbox Business plans do have a monthly limit on the number of upload API calls they can make.

Fire_walker
Explorer | Level 4
Go to solution

Greg, thank you so much for the reply. I have a few follow up questions. In my case, the client application (which is developed by us), when executing the first time will create a client specific SharedFolder (named using the mac address for example) on the dropbox server (my account). Can the application do that or the folder would need to be created manually by the account owner (me).

 

What I want next is to start sending files asynchronously to that folder which will get uploaded when the client connects to the internet, regardless of whether my application is running or not. For that to happen as I understood from your reply I need to first use AddFolderMember. Can this be done automatically without any manually intervention from the client side?

 

In essence I am looking for all the calls/setup to be automatic without any manual intervention.

 

thanks,

Greg-DB
Dropbox Staff
Go to solution
All API calls (e.g., creating a shared folder, inviting members, and uploading files) can be run automatically without manual user intervention.

The only part that requires manual user intervention is authorizing the app itself, via the OAuth 2 app authorization flow. Once that's done though, the resulting access token can be stored and re-used without further manual intervention.

Note that your app does need to be running in order to issue the calls though.

Also, it sounds like you may want to be able to issue these while offline. The Dropbox API operates by having your app communicate directly with the Dropbox servers, so you need an Internet connection to make the calls. If you don't have a connection, you can queue the calls up, but this isn't something that the API/SDK offers for you; you'd need to build that in to your own logic. Alternatively, you could require that the official Dropbox desktop client application be installed, and then just write the files to the local Dropbox folder. The official Dropbox desktop client application installed would then upload the files when online. Note that we don't offer an official interface for this though. You'd just be interacting with the local filesystem.

Fire_walker
Explorer | Level 4
Go to solution

Thank you for the reply Greg. I do like the solution where the dropbox application is installed and I can then just write/move the files to the local dropbox folder and they get synced when the user connects to internet, however, in that case would I need to have my account signed in on every machine? Is there a workaround to that? Also, each client would have a unique folder and I want the communication to be one way just i.e. uploading the content to my account and not syncing all the folders from my account to the client machine. Would this work?

Greg-DB
Dropbox Staff
Go to solution

To take advantage of the official Dropbox desktop client application, you would need to be signed in to the official Dropbox desktop client application on every computer where you want to run this. There isn't a way around that, as otherwise the client can't sync to the account.

 

There isn't an official interface for managing the syncing functionality of the official Dropbox desktop client application installed, so it would be operating normally, which means doing bidirectional syncing. You can set up Selective Sync, but doing so would be a manual process, just like signing in to the client to begin with.

 

If you need control over the specific syncing behavior, you may be better off doing the syncing in your own app's code. Relying on the official Dropbox desktop client application can save you some work, but it comes at the cost of control and visibility into the actual operations being performed. (You would still need to use the API to do the sharing calls anyway, e.g., to initially share a folder or invite members.)

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Fire_walker Explorer | Level 4
What do Dropbox user levels mean?