0

我对谷歌集成非常陌生,我正在尝试集成谷歌日历。我可以通过 API 获取日历列表及其事件。

现在,我希望只要谷歌日历有任何变化,我的 webhook 就会被调用。我想为此使用谷歌推送通知,以便我可以创建一个频道并在那里注册我的 webhook。现在的问题是,如何测试我的 webhook 是否正常工作。因为 Google 不允许将 localhost 添加为可变域。我尝试使用 Ngrok,但谷歌也不允许我注册该域。

有什么方法可以在本地测试 google webhook?如果还有其他方法可以实现 google webhook,也请分享。

4

2 回答 2

0

After implementing your controller and the action inside your API, go to postman put the necessary URL and change the values of the fields below.

Get the values from the Calendar API Watch function that you should have been implemented before.

Here is a very useful link to help you through out the whole implementation.

enter image description here

于 2021-03-12T21:16:54.193 回答
-1

要在日历中使用推送通知,您需要注册您的域。您还需要使用 HTTPS(不是 HTTP)作为传输协议。

目前我无法在没有经过验证的域的情况下在本地测试这个 webhook。

于 2020-01-01T12:43:12.737 回答