Google push notifications - Unauthorized WebHook callback channel

后端 未结 5 666
南旧
南旧 2020-11-30 06:36

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.

相关标签:
5条回答
  • 2020-11-30 07:19

    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).

    0 讨论(0)
  • 2020-11-30 07:31

    You have to add your domain to the developers console.

    How to:

    1. Log in to the Google Developers Console
    2. Select your project
    3. Under 'APIS & AUTH' select 'Push'
    4. Click 'Add domains'
    5. Enter the needed domains (Only the domain is needed, not the whole notification url)
    6. Click the 'Add domains' button

    After that it should work unless there's something else wrong with what you're doing :p

    0 讨论(0)
  • 2020-11-30 07:41

    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.

    0 讨论(0)
  • 2020-11-30 07:41

    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.

    0 讨论(0)
  • 2020-11-30 07:42

    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.

    0 讨论(0)
提交回复
热议问题