Greg-DB Dropbox Community Moderator

Comments

  • The iOS Core SDK doesn't do any caching for you, and I'm not sure what functionality you're referring to in DBRoulette. The DBRoulette sample app displays images, not text, anyway, unless you're referring to a modified version of it? Anyway, there are a few things that might cause your delegate methods to not be called: 1.…
  • Have you implemented both of the delegate methods? - (void)restClient:(DBRestClient*)client loadedFile:(NSString*)destPath; - (void)restClient:(DBRestClient*)client loadFileFailedWithError:(NSError*)error; What do you get from those?
  • Tokens don't expire by themselves (but they can be manually revoked). What doesn't work exactly? What error or output are you getting?
  • You just need to call credentialStoreForUserID once to get your access token/secret, which you can do anywhere in the app, as long as the account is already linked. That would look like: MPOAuthCredentialConcreteStore *creds = [[DBSession sharedSession] credentialStoreForUserId:@"12345"]; NSLog(@"access token key: %@…
  • I recommend working through the tutorial to see how to call methods in that SDK. For example: [self.restClient loadMetadata:@"/"]; So, using loadAccountInfo would look something like: [self.restClient loadAccountInfo]; And you'd need to implement these delegate methods to get the response: -…
  • That SDK uses OAuth 1 and version 1 of the Dropbox API, a.k.a. the Core API. The DBRestClient.loadAccountInfo method corresponds to /account/info.
  • Are you using an SDK or library? If so, which?
  • You can get your user ID from the account information API call (/account/info on v1, or /users/get_current_account on v2).
  • The access token secret is not the same thing as the app secret. If you're using OAuth 1, the access token secret is the "oauth_token_secret" returned by /oauth/access_token. If you're using OAuth 2, the access token is just one string, and doesn't have a separate "secret" portion.
  • There are any number of ways obfuscate or encrypt it, but it's impossible to actually protect a secret in a client-side application. (E.g., if you encrypt it, the encryption key eventually needs to be on the device too, and so can be similarly stolen, etc.) No matter what, an attacker could extract the secret from the app.…
  • No problem. To elaborate a bit on the security concerns, note that client-side applications can't keep secrets, meaning that any access token stored in a distributed app could be extracted directly, or sniffed in transit. That means that a malicious user could get the access token, and use it to access the Dropbox API…
  • [Cross-linking for reference: https://stackoverflow.com/questions/34603685/how-to-download-files-to-app-from-app-folder-without-linking-an-account-via-drop ] Based on the additional information you posted in your StackOverflow question, it sounds like you just want your app to connect to your own Dropbox account, as…
  • Hi Jan, API v2 isn't a REST API, and so doesn't conform to many REST patterns. You can find some more information on the design in the following blog posts: https://blogs.dropbox.com/developers/2015/04/how-many-http-status-codes-should-your-api-use/…
  • The /media endpoint does return the original file. The Dropbox API doesn't currently offer a way to get HLS or transcoded streams, but I'll be sure to pass this along as a feature request.
  • Juanvi, I'm not sure exactly what the problem or solution Davide encountered was, but please feel free to open a new thread with the details of the issue you're seeing (e.g., a sample request and response) and we'll be happy to help.
  • If you want to use the Android Dropbox Chooser, yes, the official Dropbox app needs to be installed, since the Chooser is built into the official Dropbox app. If that won't be sufficient for your app, you can use the API itself build your own file list, get thumbnails, etc.:…
  • Are you using an Android emulator (as opposed to a physical device), or otherwise some device without the Play Store? The Dropbox Chooser itself is built in to the official Dropbox app, which is why the library prompts you to install the app if it isn't found. TheActivityNotFoundException error message is indicating that…
  • No, there isn't a way to check for uploads that are pending or in progress from other locations, but I'll be sure to pass this along as a feature request.
  • Hi Ricardo, I'm not aware of any specific plans to add that, but I'll send this along as a feature request.
  • You can actually use the Drop-ins with any Dropbox API app key, so you can just register a normal Dropbox API app and use that. The distinct Drop-ins option was removed from the new app creation page for the sake of simplicity. (For reference though, the old app creation page is still live here.)
  • I can't seem to reproduce the behavior you're describing, but I'm glad to hear you got this working the way you wanted.
  • If you're referring to a delay before the callback is called, that's expected because the file has to be downloaded from the Dropbox API servers over the network. If you're referring to a delay when calling NSData.contentsOfURL, that also seems reasonable, since the entire (possibly large) file is being loaded from disk…
  • Yes, the "response" callback method in the snippet you posted only fires once the operation is complete. If you get a response object back, the download succeeded. If you get an error object back, there was an error.
  • Once you have the library installed, I recommend working through the tutorial, which covers uploading files: https://www.dropbox.com/developers/documentation/python#tutorial If you're still having trouble, open a new thread with the details of the new issue:…
  • Using pip to install the Dropbox library is recommended. The official instructions are here: https://www.dropbox.com/developers/documentation/python#install The "pip install dropbox" command would be run in your command prompt, but you need to have pip installed. The installation instructions for pip itself can be found…
  • [Cross-linking for reference: https://stackoverflow.com/questions/33700332/dropbox-migrating-oauth1-to-oauth2-using-token-from-oauth1 ] This call needs to be signed using OAuth 1, so this blog post, specifically step 4, maybe be helpful:…
  • Yes, there's a new files_get_temporary_link method in the Python SDK you can use: https://dropbox-sdk-python.readthedocs.io/en/master/moduledoc.html#dropbox.dropbox.Dropbox.files_get_temporary_link And for reference, in the .NET SDK, that's GetTemporaryLinkAsync:…
  • Dropbox API v2, which the .NET SDK uses, doesn't currently offer an equivalent of the v1 /media endpoint, but I'll be sure to pass this along as a feature request.
  • Unfortunately this will be hard to debug remotely, since you need to redact the access token itself, for the sake of security. Where did you get the access token and how are you loading it though? Can you double check there aren't any stray characters on it? E.g., if you copied and pasted it from somewhere, make sure there…