google-calendar-api - 需要帮助将 Google Cloud Function URL 注册为已验证域以接收推送通知
问题描述
我正在尝试调用谷歌日历的推送通知 API。我写了一个谷歌云函数,它只返回一个包含请求正文和标头的响应。我想使用这个谷歌云功能 url 作为推送通知的接收 url。谷歌文档提到了验证和注册域的步骤,作为其中的一部分,它要求我上传二进制文件。不确定如何针对此云功能域上传二进制文件。我的域看起来像https://asia-northeast1-project-name.cloudfunctions.net
这是我注册推送通知的请求:请求:
发布https://www.googleapis.com/calendar/v3/calendars/primary/events/watch?key= { YOUR_API_KEY } { "id": "404713b9-d880-437d-b890-83715f01af7c", "type": " web_hook", "地址": " https://asia-northeast1-huddle-quick-solutions.cloudfunctions.net/suratCalendarNotifications " }
回复:
{ "error": { "errors": [ { "domain": "global", "reason": "push.webhookUrlUnauthorized", "message": "未经授权的 WebHook 回调通道:https://asia-northeast1-project- name.cloudfunctions.net/path " } ], "code": 401, "message": "Unauthorized WebHook callback channel: https://asia-northeast1-project-name.net/path " } }
解决方案
推荐阅读
- java - 使用子字符串创建 Animal 对象
- c# - 使用 IIS 时用于 Windows 身份验证的自定义登录页面
- wordpress - 如何在推荐滑块中将滑块点转换为作者姓名?
- angular - 以编程方式触摸表单控件时,角度自定义材质控件不显示错误
- python - Python PIL 图像拆分为 RGB
- javascript - 如何使用正则表达式使用 imacros eval 删除文本中的最后一句
- python - 如何旋转熊猫数据框以包含加权平均值?
- qt - 将渐变应用于绘制的图形
- mongodb - 安装 mongodb 4.0 时出现连接错误
- angular - 在angular 5组件中调用外部js文件的函数