首页 > 解决方案 > 未收到 Google Reports API 推送通知/观看请求

问题描述

一天前,我能够使用oauthplayground成功接收到我指定 URL 的推送通知。现在,当我发送另一个监视请求时,我在 oauthplayground 响应框中收到 200 ok 作为响应,但是在地址(AWS API Gateway + Lambda 代理)检查日志时,没有来自 google 的 POST 消息。没有同步消息或任何东西。

我尝试使用 google python 客户端发送监视请求,并且发生了同样的事情。

body={'type':'web_hook','id':"id123",'address':'https://myaddress.com/notifications'}
response = service.activities().watch(userKey='all',applicationName='drive',body=body).execute()

我得到与 oauthplayground 类似的响应

{'kind': 'api#channel', 'id': 'some_id', 'resourceId': 'resource123', 'resourceUri': 'https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive?alt=json', 'expiration': '1594846986000'}

我可以通过 Postman 向我的 url 发送 POST 消息,并且在 CloudWatch 中看到了该消息的日志。我已尝试多次发送监视请求,但尽管它们的状态为 200 正常,但我的端点仍然没有收到任何东西。

我可以接收多少个观看请求可能会受到限制吗?Google 接受请求但没有将其发送到我的 URL 是否有原因?

标签: google-admin-sdkgoogle-api-python-clientapi-gatewaygoogle-reporting-api

解决方案


推荐阅读