Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
Once i have integrated the Dropbox Objective-C SDK into my project; I got appkey is ht5jlmr230u0823, and i set up OAuth 2
Redirect URIs is https://db-ht5jlmr230u0823. and account_info.write. url scheme is db-ht5jlmr230u0823. [[client.filesRoutes createFolder:@"/test/path/in/Dropbox/account"] setResponseBlock:^(DBFILESFolderMetadata *result, DBFILESCreateFolderError *routeError, DBRequestError *networkError) { if (result) { NSLog(@"%@\n", result); } else { NSLog(@"%@\n%@\n", routeError, networkError); } }]; result is nil.and I created folder ,i got response.but entries is null,and hasMore is no;Printed log:
2020-11-19 20:08:55.165617+0800 TestObjectiveDropbox_iOS[16527:343128] (null)
DropboxAuthError[{
ErrorContent = "expired_access_token/";
RequestId = e1b010698acb4729a434e523e9a63ef9;
StatusCode = 401;
StructuredAuthError = "<DBAUTHAuthError: 0x600000d418a0>";
UserMessage = nil;
}];
2020-11-19 20:08:56.947307+0800 TestObjectiveDropbox_iOS[16527:343128] DBSDKReachability Flag Status: -R ------- networkStatusForFlags
2020-11-19 20:08:56.954662+0800 TestObjectiveDropbox_iOS[16527:343128] -canOpenURL: failed for URL: "dbapi-2://1/connect?k=ht5jlmr230u0823&s=" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2020-11-19 20:08:56.955352+0800 TestObjectiveDropbox_iOS[16527:343128] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect?k=ht5jlmr230u0823&s=" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2020-11-19 20:09:41.715453+0800 TestObjectiveDropbox_iOS[16527:343128]
Success! User is logged into Dropbox.
2020-11-19 20:10:06.103175+0800 TestObjectiveDropbox_iOS[16527:343128] Folder is large enough where we need to call `listFolderContinue:`
Hope to get your reply!
Thanks!
It looks like there are a few things here, so I'll try to address them each:
First, note that you don't need to register a redirect URI of "https://db-ht5jlmr230u0823" on the Dropbox web site. The SDK and API will handle that for you. You just need to register your URL scheme of "db-ht5jlmr230u0823" as instructed.
The 'account_info.write' scope is only necessary if you need to use the setProfilePhoto method.
You can use the createFolder method to create a folder, but it's better to use the newer createFolderV2. You mentioned "result is nil", so that would indicate an error occurred. You should make sure you also check the routeError and networkError variables for errors.
Your reference to "entries is null,and hasMore is no" sounds like you're referring to the result of a listFolder call. If you called that with the path for a brand new folder, that would be expected, since by default new folders are empty.
The 'expired_access_token' error indicates that the short-lived access token you're using has expired. You can find more information on how this works in the OAuth Guide.
The 'DBSDKReachability' line is just for reference and can be ignored.
The 'canOpenURL: failed for URL' lines can also be ignored. Those indicate that the official Dropbox iOS app is not installed. The SDK will instead use the built-in flow to process the app authorization. The "Success! User is logged into Dropbox." line then does seem to indicate that the authorization flow did work.
The "Folder is large enough" line seems to be some of your own logging indicating that you need to call back to listFolderContinue. Please refer to the listFolder and listFolderContinue documentation for information on using those.
Hello,
I'm running tests on the simulator. when I used createFolder, result is nil,routeError is nil,networkError is error.print log:
<DBFILESCreateFolderError: 0x600003a771c0>
DropboxHttpError[{
ErrorContent = "path/conflict/folder/..";
RequestId = ebdf556d699e4888a0808509712d1287;
StatusCode = 409;
UserMessage = nil;
}];
and when i used createFolderV2,result is nil,routeError is DBFILESCreateFolderError *0x0000600003a7e000,print log:
<DBFILESCreateFolderError: 0x600003a7e000>
DropboxHttpError[{
ErrorContent = "path/conflict/folder/.";
RequestId = 2479a33598ae4e909ac96a3032e4f606;
StatusCode = 409;
UserMessage = nil;
}];
A 'path/conflict/folder' error like this indicates "There’s a folder in the way". That is, the folder could not be created because there's already a folder at the specified path.
Hello,
A 'path/conflict/folder' error like this indicates "There’s a folder in the way". That is, the folder could not be created because there's already a folder at the specified path. How can I see the data in my cloud disk, or how to obtain the data in the cloud disk, I want to know how to display the data stored in my cloud disk on my app.
If you want to manually browse the contents of your own Dropbox account, you can do so using the standard Dropbox products, such as the Dropbox web site at https://www.dropbox.com/home .
To list the contents of the connected account in your own app, you can use the listFolder and listFolderContinue methods. And to download the contents of a file, you can use the download methods.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!