Click here to Skip to main content
15,748,082 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am very new to google apis can i am trying to implement google calendar webhooks where i am trying to get the notification if there is any event added to the calendar....

I have added my domain to Search Console verified teh domain too...

I have added my domain in the Domain verification section too..

I am using this below link to test :

Now i am trying to validate then it is throwing an exception as : Unauthorized WebHook callback channel:

Can you please let me know what am i missing

It would be of great help if you can provide me some working code...

What I have tried:

I have tried sending as :

"address": "",
"id": "01234567-89ab-cdef-0123456789ab",
"type": "web_hook"

Return i am getting as :

"error": {
"errors": [
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel:"
"code": 401,
"message": "Unauthorized WebHook callback channel:"

I have also tried :

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("");
          request.Method = "POST";

          request.ContentType = "application/json";
          string postData = "type=web_hook&id=01234567-89ab-cdef-0123456789ab&address=";
          byte[] bytes = Encoding.UTF8.GetBytes(postData);
          request.ContentLength = bytes.Length;

          Stream requestStream = request.GetRequestStream();
          requestStream.Write(bytes, 0, bytes.Length);

          WebResponse response = request.GetResponse();
          Stream stream = response.GetResponseStream();
          StreamReader reader = new StreamReader(stream);

          var result = reader.ReadToEnd();
Updated 5-Mar-17 23:46pm
F-ES Sitecore 6-Mar-17 5:47am    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900