使用api时,随机获取Google驱动器文件上的ResourceNotFoundException。 他们工作了好几天,过了一会儿就拒绝通过API下载。 我仍然可以从UI访问它们,所有权限设置都可以,但API访问权限已被破坏。 有什么想法吗?
com.google.gdata.util.ResourceNotFoundException: OK
<!DOCTYPE html><html lang="en" ><head><meta name="description" content="Web word processing, presentations and spreadsheets"><link rel="shortcut icon" href="https://ssl.gstatic.com/docs/documents/images/kix-favicon5.ico"><title>Google Docs -- Page Not Found</title><link href="//fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css"><style>/* Copyright 2012 Google Inc. All Rights Reserved. */
.goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inline}#drive-logo{color:#91959c;font-family:"Open Sans",Arial,sans-serif;font-size:27px;font-weight:300;position:absolute;text-shadow:0 1px 1px white;white-space:nowrap}#drive-logo img{padding:0 0.4em 0 0;position:relative;top:2px;vertical-align:middle}#drive-logo a{color:#91959c;text-decoration:none}#drive-logo span.goog-inline-block{margin-top:3px;vertical-align:top}</style><style type="text/css">body {background-color: #fff; font-family: Arial,sans-serif; font-size: 13px; margin: 0; padding: 0;}a, a: link, a: visited {color: #112ABB;}</style><style type="text/css">.errorMessage {font-size: 12pt; font-weight: bold; line-height: 150%;}</style></head><body><div style="margin: auto; max-width: 750px;"><div style="margin: 80px 40px 20px 40px; position:relative; "><div style="position: absolute; top: -80px;"><h1 id="drive-logo"><a href="/"><img src="//www.google.com/images/logos/google_logo_41.png" width="116" height="41" alt="Google logo" ><span class="goog-inline-block">Drive</span></a></h1></div><div align="center"><p class="errorMessage" style="padding-top: 50px">Sorry, the page (or document) you have requested does not exist.</p><p>Make sure that you have the correct URL and that the owner of the document hasn't deleted it.</p><div style="background: #F0F6FF; border: 1px solid black; margin-top: 35px; padding: 10px 125px; width: 300px;"><p><strong>Want to create your own online docs?</strong></p><p>Google Docs makes it easy to create, store and share online documents, spreadsheets and presentations.</p><p>Learn more at <a href="https://docs.google.com">docs.google.com</a>.</p></div></div></div></div></body></html>
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
at com.google.gdata.client.media.MediaService.getMediaResource(MediaService.java:234)
at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:286)
at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302)
答案 0 :(得分:1)
您似乎正在使用较旧的Gdata库而不是新的Drive SDK。这并不是说它不应该工作,只是它不再是首选的API。文档和工具可以更好地支持Drive SDK。
您回到HTML页面而不是简单的API响应有点奇怪。您使用的是什么网址?