Calendar Webhooks Request Returning "Unauthorized WebHook callback channel"

2,604 views
Skip to first unread message

Shaun

unread,
Jan 4, 2014, 12:33:15 AM1/4/14
to google-ca...@googlegroups.com
I have whitelisted the root domain for my request, i.e. myapp.appspot.com in the webmaster tools and it's listed as a notification endpoint in the web apis console. When I try to register a push notification to the root url: "https://myapp.appspot.com" it works great. 

If I add a path to it like: "https://myapp.appspot.com/backend/webhooksurl" it throws the unauthorized webhook callback channel. Given that I own the root url and have verified it, why in the world does it care about the path after that or am I doing something wrong? Thanks!

The error returned looks like this:

PostData returned : {



"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://promptappointment.appspot.com/backend/GoogleCalendarWebHook"
}
],

"code": 401,
"message": "Unauthorized WebHook callback channel: https://promptappointment.appspot.com/backend/GoogleCalendarWebHook"
}
}

thanks!

dinesh reddy

unread,
Jan 4, 2014, 12:50:10 AM1/4/14
to google-ca...@googlegroups.com
Are you trying this in google playground ? If so it never worked there. Try to create watch channels directly from your server.


--
You received this message because you are subscribed to the Google Groups "Google Calendar API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-calendar...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-calendar-api.
For more options, visit https://groups.google.com/groups/opt_out.



--
---------------------------
regards,
Dinesh Reddy

Shaun

unread,
Jan 4, 2014, 9:35:28 PM1/4/14
to google-ca...@googlegroups.com
Nope trying this on my live server. The sub folder thing is very odd. And also in webmaster tools it will let you verify ownership on subfolders. Maybe that makes sense for someone but I would imagine the root domain or even a domain like new.domain.com would be sufficient. I suppose I can try this next but I think Google should just see if I have rights to the root domain and let me add a notification endpoint to anything underneath that.

So in this case is I have myapp.appspot.com verified so myapp.appspot.com/folder should be fine.

Parmdrish Singh

unread,
Feb 15, 2014, 6:25:57 AM2/15/14
to google-ca...@googlegroups.com
Hello Dinesh,

Can you please help me in setting up watch request for push notification ?  I will appreciate your help.

bj...@silkwormconsulting.com

unread,
Dec 11, 2014, 9:19:56 PM12/11/14
to google-ca...@googlegroups.com
I'm having the exact same issue. Did anyone solve this? I'm using the .Net client.

UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
                new ClientSecrets
                {
                    ClientId = "{some-client-id}",
                    ClientSecret = "{some-client-secret}",
                },
                new[] { DriveService.Scope.Drive, DriveService.Scope.DriveAppdata, DriveService.Scope.DriveFile },
                "user",
                CancellationToken.None).Result;

            Google.Apis.Drive.v2.Data.Channel channel = new Channel()
            {
                Id = Guid.NewGuid().ToString(),
                Address = @"https://somewebsite.net",
                Type = "web_hook",
            };
            
            // Create the service.
            var service = new DriveService(new BaseClientService.Initializer()
            {
                HttpClientInitializer = credential,
                ApplicationName = "Google Drive Client",
            });

            //ChangesResource resource = new ChangesResource(service);
            //var watchRequest = resource.Watch(channel);

            FilesResource fileResource = new FilesResource(service);
            var watchRequest = fileResource.Watch(channel, fileId);
            

            try
            {
                watchRequest.Execute();
                return watchRequest;
            }
            catch(Exception exc)
            {
                Console.WriteLine(exc.StackTrace);
                return watchRequest;
Message has been deleted

Sasa Bogicevic

unread,
Mar 9, 2015, 7:51:01 AM3/9/15
to google-ca...@googlegroups.com
Anybody ?

Artemius Pompilius

unread,
Oct 8, 2018, 10:47:34 AM10/8/18
to Google Calendar API
I confirmed my domain, checked my SSL, but problem hasn't gone.
Finally the solution was use Service Acconut Key in Google Developers Console (not API Key and not OAuth client ID).


понедельник, 9 марта 2015 г., 14:51:01 UTC+3 пользователь Sasa Bogicevic написал:
Anybody ?

Kumaresan J

unread,
Dec 15, 2018, 9:55:54 AM12/15/18
to Google Calendar API
Hi,

Thank you very much, it is working. WE HAVE TO USE SERVICE ACCOUNT KEY INSTEAD OF (API KEY OR OAUTH CLIENT ID)
Reply all
Reply to author
Forward
0 new messages