我在使用OAuth 2.0 Playground上的文档列表API时遇到问题。除此之外,所有其他API都有效。该请求将从操场发送:
GET /feeds/default/private/full/ HTTP/1.1
Host: docs.google.com
Content-length: 0
Authorization: OAuth <the oAuth string generated>
回应如下:
HTTP/1.1 400 Bad Request
status: 400
content-length: 19
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
expires: Tue, 29 May 2012 17:11:47 GMT
x-google-cache-control: remote-fetch
server: GSE
via: HTTP/1.1 GWA
cache-control: private, max-age=0
date: Tue, 29 May 2012 17:11:47 GMT
x-frame-options: SAMEORIGIN
content-type: text/html; charset=UTF-8
-content-encoding: gzip
Invalid request URI
由于Google云端硬盘,API是否已被弃用,或者我还有其他错误吗?
答案 0 :(得分:1)
您必须通过将?v=3
查询参数添加到URI或发送GData-Version: 3.0
标头,将请求发送到API的第3版。