在Google日历webhook / push_notification请求中未在标头中接收数据

时间:2018-04-06 06:35:12

标签: ruby-on-rails google-calendar-api

我使用以下代码为Google日历观看事件创建了一个新频道,但在从Google收到webhook时未在标题中获取任何数据。

client = Google::APIClient.new

client.authorization.access_token = "#{access_token}"

service = client.discovered_api('calendar', 'v3')

data = client.execute api_method: service.events.watch, parameters: {
  calendarId: "primary",
}, body_object: {
  id: "34234234-89ab-cdef-0123456789ab",
  type: "web_hook",
  address: "#{my_domain}/notifications"
}

0 个答案:

没有答案