2015-07-09 92 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

回答