I\'m facing problem with Google push notifications (for drive). I use service account which works perfectly for all other drive operations except drive changes watch.
I confirmed my domain, checked my SSL, but problem hasn't gone.
Finally I found the solution: Use Service Acconut Key in Google Developers Console (not API Key and not OAuth client ID).
You have to add your domain to the developers console.
How to:
After that it should work unless there's something else wrong with what you're doing :p
For me, as I put in a comment above,
The Domain Verification was not saving in google developer console (refresh the page and it was gone). The problem ultimately ended up being I was logged in as two google accounts, my gmail account and my company account. Adding the domain verification seemed to get confused about the account and not save the domain settings.
Try logging in using a different browser or incognito session if you use multiple google accounts.
So this is all because of Settings on console.developers.google.com. You need to add your back-end domain to both Authorised domains on (OAuth Consent Screen tab) and Allowed domains (on Domain Verification tab).
So there reason why it works for you now is that probably you verified and added your top-level domain already while your local environment had separate (not a sub domain of the verified top-level) domain at the time, specially if you had been exposing your local server on internet.
For me, I wanted the callback webhook URL as https://test-apis.domain.io
. So for domain verification, I added test-apis.domain.io
and then tried to modify the TXT record but it never was working(validating).
Finally ended up verifying just domain.io
with the same method. After this was done I was able to add the domain test-apis.domain.io
in the credentials "Domain verification" screen. Hope this helps others as well.