0
votes

I am following the docs https://developers.google.com/calendar/v3/push#creating-notification-channels

I am trying to setup my channel to watch for changes to events, using postman I am posting to:

https://www.googleapis.com/calendar/v3/calendars/xxx/events/watch

[{"key":"id","value":"[email protected]"},
{"key":"type","value":"web_hook"},
{"key":"address","value":"https://xxx.firebaseapp.com"},{"key":"key","value":"AIzaSyBkAEZGoQwB0f-Kmq4mCCzm93422up8oQw"}]

I keep getting the error below:

{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "required",
                "message": "Login Required",
                "locationType": "header",
                "location": "Authorization"
            }
        ],
        "code": 401,
        "message": "Login Required"
    }
}

Any ideas why I am getting this? I can fetch data from the API ok.

1

1 Answers

0
votes

You are getting the 401 "login required", it means that you are using an expired or invalid access.

Check this Google group discussion on how the process was done on getting the refresh token using the client ID and client secret to implement the authenticated and authorized API calls.

See also references: