EzDevInfo.com

dropbox-api

Dropbox API Ruby Client

Dropbox integration

I am new to integrating drop box, but I am not quite sure how to generate a call to get the request token secret.

https://www.dropbox.com/developers/reference/api#request-token

I have to make a call to this url https://api.dropbox.com/1/oauth/request_token what is the best way to do this? with c#?.

Thank you for any help you may provide

PS: I am just not sure which c# libraries to use for this.


Source: (StackOverflow)

Data syncing with DropBox API and iOS

I have an iOS app which stores data in the local directory. I'd like to be able to sync this data between multiple devices running my app. Currently this is using core data, but I'd expect to have to change to some text-based file storage system to make syncing easier.

I was expecting the DropBox API would make this nice and easy, and that I could tell the API to simply sync the contents of my data folder on startup/save. However it seems the DropBox API is nothing more than a glorified way of uploading and downloading files.

Am I wrong on this assumption? Can the DropBox API actually make it easy to keep a folder full of text files in sync? If not, is there some other service or even advice you can give? Syncing is hard - I was hoping DropBox would make it easier.


Source: (StackOverflow)

Advertisements

How to share apps folder to another dropbox user

I am developing an app that can upload and download within dropbox folder the dropbox automatically create an apps folder

my question is, how to share the folder to another dropbox user

i have tried before, it stated that the apps folder cannot be shared or can I change the coding to create the folder not in the apps folder?


Source: (StackOverflow)

Using Proguard to Obfuscate Android App with Dropbox.com Libraries

I've just finished creating an Android app that requires the Dropbox.com API libraries. I'm now trying to build the application in 'Release' mode and would like to run proguard on the code in order to obfuscate it. However, whenever I attempt to run Proguard, I get the following error:

Proguard returned with error code 1. See console
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.DropboxAPI$Entry: can't find referenced class org.json.simple.JSONArray
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.JSONParser
Warning: com.dropbox.client2.RESTUtility: can't find referenced class org.json.simple.parser.ParseException
Warning: there were 8 unresolved references to classes or interfaces.
         You may need to specify additional library jars (using '-libraryjars'),
         or perhaps the '-dontskipnonpubliclibraryclasses' option.
         java.io.IOException: Please correct the above warnings first.
         at proguard.Initializer.execute(Initializer.java:308)
         at proguard.ProGuard.initialize(ProGuard.java:210)
         at proguard.ProGuard.execute(ProGuard.java:85)
         at proguard.ProGuard.main(ProGuard.java:499)

I'm already including the '-dontskipnonpubliclibraryclasses' option and that's not helping me at all. I tried including the '-libraryjars' option, though, I may have been using it incorrectly as I'm not really sure how I'm intended to use that flag.

Does anyone have any ideas how I can correct this error? Right now, I'm unable to build my application while running it through Proguard. Any help is appreciated! Thanks!


Source: (StackOverflow)

Programmatically Download Content from Shared Dropbox Folder Links

I'm building an application to automatically trigger a download of a Dropbox file shared with a user (shared file/folder link). This was straight forward to implement for Dropbox links to files, as is outlined here.

Unfortunately this doesn't work for shared folders. Anyone have suggestions on how I could

  • Download the all of it's contents (maybe get a list of the files links inside it to download?)
  • or
  • Download a zip of the folder

Currently I can go to the url and do some screen-scraping to try and get the contents list, but the advantage of the solution described in the linked Dropbox blog entry for files is that no scraping is needed, so it's much more reliable and efficient.


Source: (StackOverflow)

How to do Dropbox authentication in a single page app without opening a new window?

I have a single page app that integrates with other services such as Dropbox and LinkedIn. Dropbox, for instance, has great API and I got the authentication working by opening Dropbox's authentication link in another window. Once the user authenticates, I ask them to close that new window to return to my app.

Clearly this is suboptimal as it takes the user away from my app, and even more cumbersome on tablets.

How would I do the authentication within the app, such is in a lightbox or a modal form?

Note that the integration itself happens server-side not client side. Presently, the Dropbox authentication page has a call back page that signals to my server that authentication was successful, which I store in the user's table in the database for future use.

Note: The bounty comment should read: A code sample is highly desired but not required.


Source: (StackOverflow)

iPhone DropBox API: How to load a file?

A very basic question concerning dropBox integration into an iPhone app.

I followed the setup of the DropBoxSDK and everything works fine. I can log on to my account and get it linked. So I set up everything correctly.

Now I would like to use it to simply load a file from the dropBox and save it again. Consider that you only want to sync ONE FILE (for the sake of simplicity), called 'example.txt' which is located in the 'Example' folder in my DropBox. The same 'example.txt' is saved locally on the iPhone in the Documents directory of my app.

The dropBox readme file suggest vaguely the following code which I find highly cryptic and can't really see how to load or save a file:

2. Make an request on the rest client:

   [[self restClient] loadMetadata:@"/"];

3. Implement the DBRestClientDelegate methods needed to get the results of the
   particular call you made:

   - (void)restClient:(DBRestClient*)client 
       loadedMetadata:(DBMetadata*)metadata {

       NSLog(@"Loaded metadata!");
   }

   - (void)restClient:(DBRestClient*)client 
       metadataUnchangedAtPath:(NSString*)path {

       NSLog(@"Metadata unchanged!");
   }

   - (void)restClient:(DBRestClient*)client 
       loadMetadataFailedWithError:(NSError*)error {

       NSLog(@"Error loading metadata: %@", error);
   }

So my (hopefully) simple question is how I can:

  • check if there is an example folder in my dropbox
  • if not, create one and save the example.txt from app documents into this example folder
  • load example.txt
  • once programme quits: save example.txt to DropBox

I can't really find an answer to these quite basic steps in the DropBox docs on the website. The example they've provided I find too confusing... especially as it is only about loading files and not saving them as far as I can see.

I'd be grateful for any help or suggestions of how to go about this.


Source: (StackOverflow)

How to overwrite file with parent rev using Dropbox API in iOS?

I am developing an iOS application using Dropbox API. While uploading a file using the dropbox API, I just want to overwrite the existing file with the same name. How can I set the parent rev and what value? Thanks!


Source: (StackOverflow)

How to get my APP_KEY and SECRET_KEY for Dropbox sync?

I'm trying to build in the opportunity to sync my application's *.csv files with desirable dropbox account. What I've done so far:

  1. Permissions and com.dropbox.client2.android.AuthActivity in manifest
  2. Signed my app with my release-key-store
  3. Implemented some code to check dropbox service

The problem is that I can't understand where do I get APP_KEY and SECRET_KEY for this matter?

When I try to launch the app I'm getting this:

05-22 12:31:54.762: E/AndroidRuntime(5587):     at com.dropbox.sync.android.CoreAccountManager.initNativeLib(CoreAccountManager.java:109)

05-22 12:31:54.762: E/AndroidRuntime(5587):     at com.dropbox.sync.android.CoreAccountManager.<init>(CoreAccountManager.java:89)

05-22 12:31:54.762: E/AndroidRuntime(5587):     at com.dropbox.sync.android.DbxAccountManager.getInstance(DbxAccountManager.java:112)

Any clue what am I doing wrong?


Source: (StackOverflow)

Dropbox Datastore - Sharing data across user accounts

Is it possible to share data saved by an app across all user accounts that have the application?


Source: (StackOverflow)

How can I get the dropbox short url from Dropbox Chooser?

Is there a way to get the short url for sharing a document through the Dropbox Chooser?


Source: (StackOverflow)

Is it possible to disable dropbox notifications for app folder

I'm playing around with dropbox.js and have created a web-app to take notes and save them to my dropbox account.

Is there a possibility to turn off notifications for only this one App folder without turning off all notifications?


Source: (StackOverflow)

Allow Dropbox API to access my account on user's device

As a mobile developer, I'm looking for a solution that allows users of my application to download multiple .zip files that will add a "modular" feel to my application. I've used the Dropbox API in another app to allow users to backup items to their account, but now I need the user to access my account.

Is there a way to authenticate the Dropbox session to my account automatically, or just connect to my Public folder without the user even noticing?

Followup Question

What are the security implications of hard-coding my access keys and app key/secret into an application? I know it is fairly simple to get the source code from an .apk, but what could someone do with that information?


Source: (StackOverflow)

Storing API keys in Android, is obfustication enough?

I'm using the Dropbox API. In the sample app, it includes these lines:

// Replace this with your consumer key and secret assigned by Dropbox.
// Note that this is a really insecure way to do this, and you shouldn't
// ship code which contains your key & secret in such an obvious way.
// Obfuscation is good.
final static private String CONSUMER_KEY = "PUT_YOUR_CONSUMER_KEY_HERE";
final static private String CONSUMER_SECRET = "PUT_YOUR_CONSUMER_SECRET_HERE";

I'm well aware of the mantra 'Secrecy is not Security', and obfuscation really only slightly increases the amount of effort required to extract the keys. I disagree with their statement 'Obfustication is good'. What should I do to protect the keys then? Is obfustication good enough, or should I consider something more elaborate?


Source: (StackOverflow)

Dropbox differential/incremental uploads using REST API

We know that Dropbox desktop clients use a binary diff algorithm to break down all files into blocks, and only upload blocks that it doesn't already have in the cloud (http://serverfault.com/questions/52861/how-does-dropbox-version-upload-large-files).

Nevertheless, the Dropbox API, as far as I see, can only upload the whole file (/files_put, /files (POST)) when a sync is needed.

Is there any way to do differential/incremental syncing using the Dropbox API, i.e. upload only the changed portion of the file like the desktop clients do?

If this is not possible, then what are the best practices to periodically sync large files that has small changes using the Dropbox API?


Source: (StackOverflow)