3
votes

The official Dropbox Android client fails with

Caused by com.dropbox.client2.exception.DropboxServerException
       at com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:265)
       at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:415)
       at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:339)
       at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:194)
       at com.dropbox.client2.RESTUtility.request(RESTUtility.java:124)
       at com.dropbox.client2.DropboxAPI.metadata(DropboxAPI.java:1919)

With DropboxServerException (nginx): 400 Bad Request (v1_retired)

Awesome: client2 apparently uses API v1. So, where can I obtain a new Android client which uses v2? The https://github.com/gini/dropbox-java-sdk/tree/master/src/main/java/com/dropbox/client2 repo does not contain Android-specific bits.

Googling for Dropbox Core Android only finds the old v1 API: https://www.dropbox.com/developers-v1/core/start/android

2
how your resolved that issue? - Narendra Singh

2 Answers

3
votes

the DropBox API v1 is now deprecated.

https://blogs.dropbox.com/developers/2017/09/api-v1-shutdown-details/

migrate to API v2 in order to access DropBox from your code. Follow this reference for migration guide.

https://www.dropbox.com/developers/reference/migration-guide.

1
votes

Ah, the Dropbox Java SDK supports Android as well (even though it doesn't state it explicitly) and provides auth Activities.

The SDK is at https://github.com/dropbox/dropbox-sdk-java After you clone that repo, the Android example is located in the examples/android folder.