{"action":"created","issue":{"url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/1509","repository_url":"https://api.github.com/repos/googleapis/google-api-nodejs-client","labels_url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/1509/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/1509/comments","events_url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/1509/events","html_url":"https://github.com/googleapis/google-api-nodejs-client/issues/1509","id":391397895,"node_id":"MDU6SXNzdWUzOTEzOTc4OTU=","number":1509,"title":"calendar.events.watch not working","user":{"login":"DeCryptinWeb","id":4082475,"node_id":"MDQ6VXNlcjQwODI0NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4082475?v=4","gravatar_id":"","url":"https://api.github.com/users/DeCryptinWeb","html_url":"https://github.com/DeCryptinWeb","followers_url":"https://api.github.com/users/DeCryptinWeb/followers","following_url":"https://api.github.com/users/DeCryptinWeb/following{/other_user}","gists_url":"https://api.github.com/users/DeCryptinWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/DeCryptinWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeCryptinWeb/subscriptions","organizations_url":"https://api.github.com/users/DeCryptinWeb/orgs","repos_url":"https://api.github.com/users/DeCryptinWeb/repos","events_url":"https://api.github.com/users/DeCryptinWeb/events{/privacy}","received_events_url":"https://api.github.com/users/DeCryptinWeb/received_events","type":"User","site_admin":false},"labels":[{"id":958354242,"node_id":"MDU6TGFiZWw5NTgzNTQyNDI=","url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/labels/:rotating_light:","name":":rotating_light:","color":"FFFFFF","default":false},{"id":958354248,"node_id":"MDU6TGFiZWw5NTgzNTQyNDg=","url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/labels/triage%20me","name":"triage me","color":"FF69B4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-15T17:47:09Z","updated_at":"2018-12-27T17:12:45Z","closed_at":null,"author_association":"NONE","body":"Hi\r\n\r\nA few days ago I started working with the Google Calendar API. First I went through the [nodeJS quickstart guide](https://developers.google.com/calendar/quickstart/nodejs) and got the example working on my local environment. Now my goal is to get notified on my server when a new event is created or an existing event changes. If I understand the Google Calendar docs correctly I should use the [watch endpoint](https://developers.google.com/calendar/v3/reference/events/watch) which can be accessed by the calendar.events.watch method in the context of the quickstart guide.\r\n\r\nCurrently I'm trying to invoke calendar.events.watch like this:\r\n\r\n```javascript\r\n  import {google} from 'googleapis' // v 36.0.0\r\n  import uuid from 'uuid/v1'\r\n  const SCOPES = ['https://www.googleapis.com/auth/calendar']\r\n\r\n  // I didn't include the code which is doing the auth related stuff as it is exactly \r\n  // the same code as in the quickstarte guide\r\n\r\n  function watch () {\r\n    const calendar = google.calendar({version: 'v3', auth});\r\n\r\n    const options = {\r\n        \"id\": uuid(),\r\n        \"token\": \"myToken123\",\r\n        \"type\": \"web_hook\", // Don't know if web_hook is a valid type. I just copied it from other examples.\r\n        \"address\": \"http://mywebsite.com\",\r\n        \"params\": {\r\n            \"ttl\": \"3600\"\r\n        }\r\n    }\r\n\r\n    calendar.events.watch({calendarId: 'primary'}, options, (err, res) => {\r\n        console.log({err})\r\n        console.log({res})\r\n        return null\r\n    })\r\n  }\r\n\r\n  watch()\r\n```\r\n\r\nWhen I run the code above, the logged err-object contains \"Error: entity.resource\" and the res-object is undefined. Am I doing something wrong or is this a bug?\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/comments/450193495","html_url":"https://github.com/googleapis/google-api-nodejs-client/issues/1509#issuecomment-450193495","issue_url":"https://api.github.com/repos/googleapis/google-api-nodejs-client/issues/1509","id":450193495,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDE5MzQ5NQ==","user":{"login":"DeCryptinWeb","id":4082475,"node_id":"MDQ6VXNlcjQwODI0NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/4082475?v=4","gravatar_id":"","url":"https://api.github.com/users/DeCryptinWeb","html_url":"https://github.com/DeCryptinWeb","followers_url":"https://api.github.com/users/DeCryptinWeb/followers","following_url":"https://api.github.com/users/DeCryptinWeb/following{/other_user}","gists_url":"https://api.github.com/users/DeCryptinWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/DeCryptinWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeCryptinWeb/subscriptions","organizations_url":"https://api.github.com/users/DeCryptinWeb/orgs","repos_url":"https://api.github.com/users/DeCryptinWeb/repos","events_url":"https://api.github.com/users/DeCryptinWeb/events{/privacy}","received_events_url":"https://api.github.com/users/DeCryptinWeb/received_events","type":"User","site_admin":false},"created_at":"2018-12-27T17:12:45Z","updated_at":"2018-12-27T17:12:45Z","author_association":"NONE","body":"@vishald123 Worked! I missed that part completely.\r\nMany Thanks!"}}
{"actor":{"display_login":"DeCryptinWeb"}}