1
我試圖用Drive Api下載文件,並且遇到了一些麻煩。我閱讀本指南downloading file with Drive Api v3,並使用此代碼Java Google Drive API下載文件
String fileId = "0BwwA4oUTeiV1UVNwOHItT0xfa2M";
OutputStream outputStream = new ByteArrayOutputStream();
driveService.files().get(fileId).executeMediaAndDownloadTo(outputStream);
每當我收到此錯誤`
com.google.api.client.http.HttpResponseException: 400 Bad Request
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}`