0

i'm using the Dropbox Core Api for Android. I want to generate a http-link to private files, so i can place it in text documents. So the link opens the browser, which handles authentication.

if i browse the webinterface, i get a link like
https://dl-web.dropbox.com/get/########?_subject_uid=#####&w=#############

Is there a way to do that with the Android Api?

Shared Links are no solution! (no /shares or /media )

Thanks...

1

1 Answer 1

1

No, the Dropbox API doesn't currently offer anything exactly like what you describe. If you need to access file content from your app, the best way to do so is using the /files (GET) API call, which returns the file data directly:

HTTP docs: https://www.dropbox.com/developers/core/docs#files-GET
Android docs: https://www.dropbox.com/static/developers/dropbox-android-sdk-1.6.2-docs/com/dropbox/client2/DropboxAPI.html#getFile(java.lang.String, java.lang.String, java.io.OutputStream, com.dropbox.client2.ProgressListener)

If you need a link to the data, the next best option is /media:

HTTP docs: https://www.dropbox.com/developers/core/docs#media
Android docs: https://www.dropbox.com/static/developers/dropbox-android-sdk-1.6.2-docs/com/dropbox/client2/DropboxAPI.html#media(java.lang.String, boolean)

The links returned by /media aren't share links, exactly, as they automatically expire after four hours and aren't listed on https://www.dropbox.com/links . Further, calling /media also doesn't automatically make the files non-private, as one would need the (reasonably unguessable) link to access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.