Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
rekte
8 years agoExplorer | Level 3
Attempt to read from field 'java.util.List com.dropbox.client2.DropboxAPI$Entry.contents' on a null
I have an android application which has been working perfectly until now. Recently, I'm having an error regarding the dropbox download. I've been using this app and the dropbox download for months bu...
Greg-DB
Dropbox Community Moderator
8 years agoYes, it is possible to connect just to a single Dropbox account in API v2, similar to how you could with API v1.
The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. We don't recommend doing so though, for various technical and security reasons.
However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)
The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. We don't recommend doing so though, for various technical and security reasons.
However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your account and app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)
rekte
8 years agoExplorer | Level 3
Thanks for your quick answer. I tell you what I did and would like to do and if you have a better idea please let me know:
I have an android application which does the following: When a user presses a button in the app, it creates ssh connection with my raspberry pi which creates some files and uploads them to my dropbox account.
Until stopping v1, my application searched for the latest file that got uploaded to dropbox and downloaded it, but unfortuantely it's not working now. This is the best solution I could come up with.
Do you have a better idea (how to throw back the files on raspberry pi to my app)?
Thanks
- Greg-DB8 years ago
Dropbox Community Moderator
The official Dropbox API v2 Java SDK does offer the ability to upload and download files programmatically, just like in API v1. For example, in the Dropbox API v2 Java SDK, you can use the upload method to upload files:
https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#upload-java.lang.String-
I can't offer general app development guidance, but if API v2 isn't working as expected for you, please share the code and error/output you're getting, and I'll be happy to help.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!