Reputation: 612
I am having problems with Google Drive API - Push Notifications. I did everything as specified in the documentation. Everything works perfectly to the step where I should receive "sync" notification to my endpoint. I have secure endpoint (https), certificate by letsencrypt (certbot), I have registerd and verified my domain. I suspect the problem is basic authentication on my endpoint. When I created a channel I specified my endpoint like this:
https://username:[email protected]/endpoint
Does this not work? Is there another way to specify that I have basic auth on my side?
EDIT: I tested it without basic auth (I commented out basic auth in .htaccess file) and I received sync message. So basic auth is the main problem.
Upvotes: 2
Views: 309
Reputation: 409
Silko's answer above put me on the right track.
The issue I had was that I had verified domain ownership under the wrong project in my Google console.
If you are authenticated sever-side using stored keys, make sure that your private key's project is the same as the one you've used in your console when verifying domain ownership. It wasn't at all obvious to me, either from the documentation or the console itself, that when you verify a domain, it's scoped to a single project rather than to a G Suite identity.
Hope this helps someone else.
Upvotes: 2
Reputation: 612
Looks like push notifications doesn't work with basic auth on endpoint, so I excluded my endpoint URL from basic auth by adding some rows to .htaccess file.
I used this answer for help.
Upvotes: 2