1

A day ago I was able to use oauthplayground to successfully receive push notifications to my specified URL. Now when I send another watch request, I get a 200 ok as a response in the oauthplayground response box, but checking logs at the address (AWS API Gateway + Lambda Proxy) there is no POST message from google. No sync message or anything.

I tried to use google python client to send a watch request and same thing occurs.

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

I get similar response as in 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'}

I am able to send a POST message through Postman to my url and I see a log of that in CloudWatch. I have tried multiple times to send watch requests but although they are 200 status ok, I am still not receiving anything at my endpoint.

Could there possibly be a limitation on how many watch requests I am able to receive? Is there a reason Google accepts the request, but is not sending it to my URL?

JmDev
  • 11
  • 2
  • Could it be that the request you are sending to Google is to setup/modify the watch vs. invoking it? Try doing the action tied to the watch e.g. modify a file etc – peter n Jul 15 '20 at 19:56
  • Hi peter, yes I have tried invoking (add file, move file, create, etc...) and still no notification is being sent to my url. – JmDev Jul 15 '20 at 20:12
  • The first time you succeeded to receive push notifications was the `applicationName='drive'` too? – Alessandro Jul 16 '20 at 08:36
  • I have only ever gotten push notifications working via oauthplayground. But from there the request was the same. Here's the url to post to, you'll see applicationname is still **drive** `https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive/watch` – JmDev Jul 16 '20 at 20:12
  • Is your website address compliant with these [requisites](https://developers.google.com/admin-sdk/reports/v1/guides/push#required-properties)? Are you using the same ID for each channel you create? Do you have a G Suite Business Account? – Alessandro Jul 17 '20 at 15:24
  • So after stepping away and coming back to the project a few weeks later, Push notifications are now working without any change to the code. I simply sent a new watch request and it worked! Got sync message and everything. Any thoughts as to why there was nothing being sent from google a few weeks ago? – JmDev Jul 27 '20 at 16:44
  • I have similar experiences. I had push notifications working until recently it suddenly stopped pushing notifications. /watch requests works, that pushes the 'sync' message. But since then, nothing is pushed. No infrastructures have changed. Very close to this issue. https://stackoverflow.com/questions/52900339/google-admin-sdk-push-api-sends-sync-webhooks-but-nothing-else – jasonleakey Aug 03 '20 at 23:35
  • Hit a wall on a project thanks to this bug. Hopefully Google resolves it at some point . There's a bug report for it on Google's issue tracker site. Upvote it when you can - the more votes it has the more likely it will get resolved: https://issuetracker.google.com/issues/236988209 – TheAddonDepot Jun 24 '22 at 20:04

0 Answers0