Java Google Drive API download file -


i trying download file drive api , trouble. read guidedownloading file drive api v3 , use code

string fileid = "0bwwa4outeiv1uvnwohitt0xfa2m"; outputstream outputstream = new bytearrayoutputstream(); driveservice.files().get(fileid).executemediaanddownloadto(outputstream); 

every time getting error `

com.google.api.client.http.httpresponseexception: 400 bad request {  "error": {   "errors": [    {     "domain": "global",     "reason": "badrequest",     "message": "bad request"    }   ],   "code": 400,   "message": "bad request"  } }` 

from errors , suggested actions:

error encountered can mean required field or parameter has not been provided, value supplied invalid, or combination of provided fields invalid.

this error can thrown when trying add duplicate parent drive item. can thrown when trying add parent create cycle in directory graph.

you may try solution advised in google api google docs, requesting list of documents — 400 bad request wherein specifying correct version number in http request possible solution encountered error.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -