Time to go to SE, since this has cost me more then 4 hours now.
I'm trying to setup a webhook (https://app.example.com/notications
) for Push Notifications coming from Google Drive API.
After having set-up everything I'm getting error:
...
errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://app.example.com"
}
],
...
There are a couple of results on google (most of which are here on SE) that talk about this issue. None of the solutions presented seem to work for me. Needless to say, I would be pretty much tearing my hair out if I had some.
This I what I've tried:
As explained here there are some requirements:
Step 1: Verify that you own the domain. (Complete the site verification process using Webmaster Tools)
Registered app.example.com
, through Webmaster Tools. Separately also verified example.com
although this should not matter. Check!
Step 2: Register your domain:
Done for app.example.com
. Check!
Note that the Drive API will be able to send notifications to this HTTPS address only if there is a valid SSL certificate installed on your web server. Invalid certificates include:
What I've done:
app.example.com
with an SSL certificate. constructing a POST query
https://www.googleapis.com/drive/v2/changes/watch
endpointAuthorization: Bearer x
headerContent-Type:application/json
headerPost contains a body as follows
{
"id": "someIdThatDoesntMatter",
"type":"web_hook",
"address": "https://app.example.com/notifications"
}
Check!
I'm running all this through Postman (a Chrome extensions to test http requests) so there's no app at my side that can be interfering.
What on earth could be the problem?
It was very weird but somehow it works.
https://app.example.com/notifications
try the complete URL with a trailing slash when making calendar API call
{
"id": "someIdThatDoesntMatter",
"type":"web_hook",
"address": "https://app.example.com/notifications/"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With