Comments
-
For example, I'm not an Objective-C expert, but something like this (modified from your previous code sample): MPOAuthCredentialConcreteStore *creds = [[DBSession sharedSession] credentialStoreForUserId:UID]; NSString *authorization = [NSString stringWithFormat:@"OAuth oauth_version=\"1.0\",…
-
That error message indicates you're still passing up the access token like an OAuth 2 access token (using the "Bearer" syntax), but if you have an OAuth 1 access token, you need to use the OAuth 1 syntax from the blog post I linked to.
-
Unfortunately, I don't have a sample implementation of this endpoint in Objective C to share. Note that the iOS SDK itself uses OAuth 1, so the stored access token from credentialStoreForUserId can't be directly used as an OAuth 2 access token, which is why you're getting that "Invalid OAuth2 token" error. If you do want…
-
What's the value of dropboxPath? Are you sure that "<Acess Token>" is linked to the same app and account as pMainDelegate.restClient?
-
Unfortunately I don't have any sample code for implementing this endpoint in Objective-C. If you try it and run in to any issues though, feel free to share your code and we'll offer whatever help we can.
-
Do you mean the iOS Core SDK? That uses API v1, which does have an equivalent endpoint: https://www.dropbox.com/developers-v1/core/docs#previews Unfortunately, that's not implemented in the iOS Core SDK, and we don't have any sample code for doing it. That being the case, you would need to implement it in your app's code.
-
Are you using a particular SDK or library, or are you calling the HTTPS endpoints directly?
-
The v1 /metadata/link endpoint does return the contents for a shared link for a folder: https://www.dropbox.com/developers-v1/core/docs#metadata-link This isn't implemented in the Python SDK, but you can call the endpoint directly.
-
Unfortunately, API v2 doesn't currently offer the ability to list out the contents of a shared link for a folder, but I'll be sure to pass this along as a feature request.
-
I'm not sure there are any drawbacks, but that's not really the intended way of using it, so I wouldn't recommend doing so.
-
I don't know off hand what the behavior in that case would be, but if you're using a personal account, you shouldn't use a team client to begin with.
-
There isn't a "current" user, so no user will be set. So, if you set null, it will just cause any user calls to fail.
-
In your sample code, the file isn't saved anywhere. The data is just available via the download object. In my sample, the file is saved to the path "Test", but if you use that you should of course change that as desired.
-
Actually, for reference, you can track progress if you use GetContentAsStreamAsync. E.g., you can do something like: var response = await client.Files.DownloadAsync(path); ulong fileSize = response.Response.Size; const int bufferSize = 1024 * 1024; var buffer = new byte[bufferSize];…
-
The Dropbox.NET SDK doesn't currently offer a way to get the progress of a download, but I'll be sure to pass this along as a feature request. It also doesn't offer a way to download folders in bulk, so you'll need to iterate through to download each desired file.
-
This should be fixed now in v2.1.2. Please update and let me know if you're still seeing any issues.
-
Thanks for the report Phil! We're looking into it.
-
This did change a bit over the versions. Are you using the latest version of the SDK? If not, please pod update and try again.
-
I see, thanks for clarifying. We do have a general import you can use as shown in the readme: #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
-
Glad to hear that's working now. That import shouldn't really be necessary though. What version of the SDK do you have installed? What other imports do you have?
-
That would also be a path conflict error. The conflict error itself just means that something is already at the path. You can then check that DBFILESWriteConflictError to see if it was a file or folder, e.g. to expand on my last example: [[client.filesRoutes createFolder:@"/testfolder"] response:^(DBFILESFolderMetadata…
-
In this case, you'd get a DBFILESCreateFolderError in your cfError variable, containing a "conflict" DBFILESWriteError in the path field. Here's an example of how you'd detect the different error cases, picking out the conflict error: [[client.filesRoutes createFolder:@"/testfolder"] response:^(DBFILESFolderMetadata…
-
This is now available via /list_file_members: https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_file_members-continue…
-
No, this isn't possible with the Dropbox API, but I'll be sure to pass this along as a feature request.
-
You're using Dropbox API v1, a.k.a. the Core API. API v1 supports both OAuth 1 and OAuth 2. You seem to be mixing OAuth 1 and OAuth 2, but you're only supposed to use one or the other for any particular API call. I.e., the "access_token" parameter and the "Authorization" header are ways to supply an OAuth 2 access token.…
-
Hi Eric, you can use instanceof to determine if a given Metadata is an instance of FileMetadata, FolderMetadata, or DeletedMetadata and then cast it accordingly, e.g., as shown here:…
-
I believe either way is safe as long as you have that isAuthError check. The asAuthError call just gives you the object as DBRequestAuthError instead of DBRequestHttpError, but it doesn't seem to make a difference in this case.
-
Hi Robert, it sounds like you're looking for the structuredAuthError property on DBRequestAuthError. That will give you the DBAUTHAuthError, on which you can call isInvalidAccessToken etc. E.g.: if (authError.structuredAuthError.isInvalidAccessToken) { NSLog(@"Invalid acess token."); } Hope this helps!
-
I'm not aware of any immediate plans, but I'll send this along as a feature request.
-
I'm not seeing this in Safari. Can you share some code to reproduce the issue? Also, please let us know what version of Safari you're using. Also, if you are seeing it in Safari, doe the answer at http://stackoverflow.com/a/34168434/1305693 help? Thanks in advance!