2015-07-09 86 views
2

我正在使用Google Reports API监视资源(如用户的Google日历活动事件)的更改。为了达到这个目的,通过以下步骤创建一个频道(或观察点):https://developers.google.com/admin-sdk/reports/v1/reference/activities/watch停止观看Google推送通知

现在,我想在频道过期之前停止观看资源。我在标题中发送了POST请求以及访问令牌,并且主体包含通道ID和资源ID(https://developers.google.com/admin-sdk/reports/v1/reference/channels/stop)。但是我一直得到404 Not Found。我在这里做错了什么?

使用相同访问令牌的所有其他请求都正常工作。

我的请求/响应看起来是这样的:

POST /admin/reports/v1/channels/stop HTTP/1.1 
Host: www.googleapis.com 
Content-length: 97 
Content-type: application/json 
Authorization: Bearer ya29.rAExOpnO_gatfyJvKWEVt8OsQ-LyaCyN3UUFjYzm0-3ExEBZ9an7WWfdDLqJspChQaiiIQ 
{ 
    "id": "5cfc250b-2faf-4f86-91b3-398326c6b4fb", 
    "resourceId": "A_HZ7mQy0Zpd6-TkQjr3aQlWd94" 
} 


HTTP/1.1 404 Not Found 
Content-length: 9 
X-xss-protection: 1; mode=block 
X-content-type-options: nosniff 
Expires: Fri, 01 Jan 1990 00:00:00 GMT 
Vary: Origin,X-Origin 
Server: GSE 
Pragma: no-cache 
Cache-control: no-cache, no-store, max-age=0, must-revalidate 
Date: Fri, 10 Jul 2015 17:10:40 GMT 
X-frame-options: SAMEORIGIN 
Content-type: text/html; charset=UTF-8 
Not Found 
+0

你看到的OAuth园地(https://developers.google.com/oauthplayground/)相同的404错误?你能编辑和包含你的请求/回应(必要时进行消毒)吗? – miketreacy

+0

是的,同样的404错误。我也注意到OAuth Playground上停止操作的请求URI与开发者文档中列出的不同。我尝试了两种方法...... – mwang

+0

听起来像这可能是一个错误,如果你在OAuth Playground上看到相同的问题。如果您是Google Apps管理员,则可以使用Google登录案例,让他们查看/确认此问题。您也可以在此处提出问题:https://code.google.com/a/google.com/p/apps-api-issues/issues/list – miketreacy

回答