通过在 GoogleAppsScript 中访问组设置一再没有乐趣,UrlFetch
我希望根据APIs Explorer中的文档测试我正在使用的基本查询
UrlFetchApp.fetch('https://www.googleapis.com/groups/v1/groups/exampleGroupId@example.com?key={YOUR_API_KEY}', fetchArgs);
永远不会完成一轮
API 资源管理器也因类似错误而失败的事实至少给了我一些安慰,但是在哪里报告失败呢?
GET https://www.googleapis.com/groups/v1/groups/exampleGroupId@example.com?key={YOUR_API_KEY}
Authorization: Bearer ya29....[snip]
X-JavaScript-User-Agent: Google APIs Explorer
给
200 OK
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 731
content-type: application/atom+xml; charset=UTF-8
date: Tue, 12 Nov 2013 11:31:09 GMT
etag: "N…[snip]…I"
expires: Tue, 12 Nov 2013 11:31:09 GMT
server: GSE
[application/atom+xml; charset=UTF-8 data]
向查询中添加任何字段
GET https://www.googleapis.com/groups/v1/groups/exampleGroupId@example.com?fields=archiveOnly&key={YOUR_API_KEY}
Authorization: Bearer ya29....[snip]
X-JavaScript-User-Agent: Google APIs Explorer
总是导致错误
400 Bad Request
cache-control: private, max-age=0
content-encoding: gzip
content-length: 209
content-type: application/vnd.google.gdata.error+xml; charset=UTF-8
date: Tue, 12 Nov 2013 11:33:34 GMT
expires: Tue, 12 Nov 2013 11:33:34 GMT
server: GSE
[application/vnd.google.gdata.error+xml; charset=UTF-8 data]
<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalidParameter</code>
<location type="parameter">fields</location>
<internalReason>Invalid field selection archiveOnly</internalReason>
</error>
</errors>
API 有问题吗?