0

I am trying to send text file to dropbox but i dont know why there is some error comes out showing Dropbox ServerException.

My program works till complete the authentication but,, after that it goes to DropboxException showing the error and

mDBApi.putFileOverwrite(filePath, new FileInputStream(file), file.length(), null);

won't get executed.

Here is my LogCat :

 12-26 10:27:24.214: W/System.err(1154): DropboxServerException (nginx): 403 Forbidden (Forbidden)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:263)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:411)
 12-26 10:27:24.224: W/System.err(1154):    at com.dropbox.client2.DropboxAPI$BasicUploadRequest.upload(DropboxAPI.java:1081)

`

I searched on google there is nothing for this.

here is the link for my whole program.

[1] [com.dropbox.client2.exception.DropboxUnlinkedException

All Dropbox Experts, Plz Help me to solve this. ( ',' )

Lalit
  • 1,713
  • 1
  • 11
  • 19
  • possible duplicate of [com.dropbox.client2.exception.DropboxUnlinkedException](http://stackoverflow.com/questions/20780729/com-dropbox-client2-exception-dropboxunlinkedexception) – user94559 Dec 26 '13 at 12:28
  • I have checked out my whole program but there is no duplications of that code. This new error comes out now : `12-27 05:30:43.293: W/System.err(937): DropboxServerException (nginx): 403 Forbidden (Forbidden)` @smarx And some one given -1 vote kindly check it, its another error this is the another issue. – Lalit Dec 27 '13 at 05:34
  • I marked this as a potential duplicate of an earlier question of yours. I also gave the -1 vote. – user94559 Dec 27 '13 at 06:01
  • I really know you are very much senior and i appreciate that sir, but this is the another problem not that one. I have edited that question and given it as a total answer properly on that, But now **`12-27 05:30:43.293: W/System.err(937): DropboxServerException (nginx): 403 Forbidden (Forbidden)`** this error comes out. Please help me to solve this. @smarx – Lalit Dec 27 '13 at 06:06
  • Someone please reply me on this. What should i do ???? – Lalit Dec 27 '13 at 06:56
  • You should stop using multiple "????" when asking a question/for help. People are more likely to help if you are clear, don't seem like you are rushing them, etc. Check your other version(s) of this question. I left a comment that says I think you are confusing the use of the filePath variable. I think filePath should be the path and file name on Dropbox, where you are giving it the file path from your phone. That could be causing the 403 Forbidden. – ialexander Dec 27 '13 at 12:14
  • OK sir, Thx for all type of help. I will follow all the instructions onward. And about my problem, you mean to say that filePath is **path given For Dropbox** is it? And if is it so, I have done changes (putFileOverwrite("Dropbox.txt",..) but still it showing the same error. @ wormtown – Lalit Dec 28 '13 at 05:22
  • As I tried a lot to do this I got the same error so if any one can solve this please give your Email-ID i will send you all the details over-there. Thank you. – Lalit Dec 28 '13 at 06:27

1 Answers1

0
AndroidAuthSession session = new AndroidAuthSession(appKeys,ACCESS_TYPE);

1.check AndroidAuthSession connection use isLinked()

2.check AccessType, in my case I use AccessType.APP_FOLDER will fail(403 Forbidden) but AccessType.DROPBOX is fine

洪彥彬
  • 21
  • 2
  • 1
    I think you accidentally copied pasted twice. What is the second `AccessType.APP_FOLDER` supposed to be? – siva.k Aug 19 '14 at 03:00