cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: Drobox API V 1 error 400 depricated

Drobox API V 1 error 400 depricated

srinivas1995
Explorer | Level 3

I am getting "error loading metadata: Error Domain=dropbox.com Code=400 "(null)" UserInfo={path=/DocWalletDB.sqlite, error=v1_retired}" in my Console.

 

I am working with Objective c .So,please help me to resolve the above issue and if i update my Dropbox SDK from V 1to V1,will my back files are delete or not?

 

 

Dropbox SDK is used in my project.Not Pods.Help me ,Thank you

4 Replies 4

Greg-DB
Dropbox Staff
As announced last year, API v1 has been retired. You can find more information in the blog post here:

https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/

We notified developers by email, but it sounds like those emails unfortunately did not make it to you.

Now that API v1 has been retired, further API calls to it will fail. You should migrate your app to API v2 instead:

https://www.dropbox.com/developers

For Objective-C, we recommend using the official Dropbox API v2 Objective-C SDK:

https://github.com/dropbox/dropbox-sdk-obj-c

The documentation there covers a few different supported installations methods.

Now that API v1 is retired, you won't be able to use it to make any further API calls, so you won't be able to upload files via API v1, for example. Any files already in your Dropbox are unaffected though, and you can upload/download using API v2 instead.

srinivas1995
Explorer | Level 3

Thankyou.

I'm entry level to this code.The previous developer integrated dropbox with sqlite database .

Can you please give me the Upload ,download methods along with how to call Paths?

Means from --- to --path ?

 

srinivas1995
Explorer | Level 3

Hi Greg ,when i'm trying to download file from dropbox to my path ,it is not happening.I'm getting below response ,please help me

I'm doubting ,iam not sure , i didn't give proper path ?

{

    "client_modified" = "2018-01-30T15:41:01Z";

    "content_hash" = d163f97a49ad06d8c25a20d2797faa20c07aee5fcf90443fa1069d720b62a768;

    id = "id:tQnxMnQWzyAAAAAAAAAACA";

    name = "Document3.zip";

    "path_display" = "/Document3.zip";

    "path_lower" = "/document3.zip";

    rev = 16cac9e50;

    "server_modified" = "2018-01-30T15:41:02Z";

    size = 656674;

}

DBUserClient *client = [DBClientsManager authorizedClient];

 

                                                              NSFileManager *fileManager = [NSFileManager defaultManager];

                                                              NSURL *outputDirectory = [fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask][0];

                                                              FilePath = [Database getDatabasePath];

                                                              NSURL *outputUrl = [outputDirectory URLByAppendingPathComponent:@"Doc.sqlite"];

                                                              

                                                              [[[client.filesRoutes downloadUrl:@"/Document3.zip" overwrite:YES destination:outputUrl]

                                                                setResponseBlock:^(DBFILESFileMetadata *result, DBFILESDownloadError *routeError, DBRequestError *networkError,

                                                                                   NSURL *destination) {

                                                                    if (result) {

                                                                        NSLog(@"%@\n", result);

                                                                        NSData *data = [[NSFileManager defaultManager] contentsAtPath:FilePath];

                                                                        NSString *dataStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];

                                                                        NSLog(@"%@\n", dataStr);

                                                                        """"'Here DataStr is coming as Nill"

 

 

Please help me, thank you

                                                                       

Greg-DB
Dropbox Staff
There are examples of using the SDK to upload and download files here:

https://github.com/dropbox/dropbox-sdk-obj-c#request-types

For instance, here is an example of downloading a file to a file specified by an NSURL:

https://github.com/dropbox/dropbox-sdk-obj-c#download-style-request

In that example, the file gets saved to the specified `destination`, which is set to the `outputUrl` variable.

Did you get any error when running your code?
Need more support?