停止观看 google 条推送通知
Stop watching google push notifications
我正在使用 Google 报告 API 来观察资源的变化,例如用户的 Google 日历 activity 事件。为此,按照此处的步骤创建了一个通道(或观察点):https://developers.google.com/admin-sdk/reports/v1/reference/activities/watch
现在,我想在频道到期之前停止观看资源。我在 header 中发送了 POST 请求和访问令牌,body 包含通道 ID 和资源 ID (https://developers.google.com/admin-sdk/reports/v1/reference/channels/stop)。但是我一直收到 404 Not Found。我是不是做错了什么?
使用相同访问令牌的所有其他请求工作正常。
我的 request/response 看起来像这样:
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
我正在使用 Google 报告 API 来观察资源的变化,例如用户的 Google 日历 activity 事件。为此,按照此处的步骤创建了一个通道(或观察点):https://developers.google.com/admin-sdk/reports/v1/reference/activities/watch
现在,我想在频道到期之前停止观看资源。我在 header 中发送了 POST 请求和访问令牌,body 包含通道 ID 和资源 ID (https://developers.google.com/admin-sdk/reports/v1/reference/channels/stop)。但是我一直收到 404 Not Found。我是不是做错了什么?
使用相同访问令牌的所有其他请求工作正常。
我的 request/response 看起来像这样:
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