Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
kestites
10 years agoExplorer | Level 4
Permission Denied - Okhttp Dispatcher
I am having trouble uploading to my folder because of a permissions error Here is my error: FATAL EXCEPTION: OkHttp Dispatcher Process: com.example.kestites.exportdatabase, PID: 3131 java.lan...
- 10 years agoThis error indicates that your OAuth 2 access token is incorrect, i.e., it doesn't match the expected pattern.
In the code you shared in your first post in this thread, you have your access token being saved to the variable ACCESS_TOKEN. It appears you redacted the value as "<ACCESS_TOKEN>" for the sake of posting it here, but make sure that the actual access token in your real code is valid, e.g., that you don't have any stray whitespace, etc.
Greg-DB
Dropbox Community Moderator
10 years agoYou can find information on that here:
https://developer.android.com/guide/topics/security/permissions.html#permissions
https://stackoverflow.com/questions/2169294/how-to-add-manifest-permission-to-android-application#2169311
kestites
10 years agoExplorer | Level 4
Okay I did that, but now I am getting this error:
W/System.err: com.dropbox.core.BadRequestException: Error in call to API function "files/upload": The given OAuth 2 access token is malformed.
W/System.err: at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:287)
W/System.err: at com.dropbox.core.DbxUploader.finish(DbxUploader.java:223)
W/System.err: at com.dropbox.core.DbxUploader.uploadAndFinish(DbxUploader.java:101)
W/System.err: at com.dropbox.core.v2.DbxUploadStyleBuilder.uploadAndFinish(DbxUploadStyleBuilder.java:92)
W/System.err: at com.example.kestites.exportdatabase.MainActivity$1.onClick(MainActivity.java:94)
W/System.err: at android.view.View.performClick(View.java:5198)
W/System.err: at android.view.View$PerformClick.run(View.java:21147)
W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err: at android.os.Looper.loop(Looper.java:148)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
- Greg-DB10 years ago
Dropbox Community Moderator
This error indicates that your OAuth 2 access token is incorrect, i.e., it doesn't match the expected pattern.
In the code you shared in your first post in this thread, you have your access token being saved to the variable ACCESS_TOKEN. It appears you redacted the value as "<ACCESS_TOKEN>" for the sake of posting it here, but make sure that the actual access token in your real code is valid, e.g., that you don't have any stray whitespace, etc.
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!