firebase - 验证 webhook 的云功能域
问题描述
如何为google calendar api设置 webhook ?
我目前正在向 api 发帖,说明 webhook/ 地址https://us-central1-pushmessage-bd1eb.cloudfunctions.net/getUsers
axios({
method: "POST",
url:
"https://www.googleapis.com/calendar/v3/calendars/xxx/events/watch",
headers: {
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json;charset=UTF-8",
Authorization: token.token_type + " " + token.access_token,
"Content-Type": "application/json"
},
data: {
id: "tester",
type: "web_hook",
address: "https://xxx.cloudfunctions.net/getUsers"
}
})
但是,我收到错误:
code: 401,
message: 'Unauthorized WebHook callback channel: https://us-central1-xxx.cloudfunctions.net/getUsers' }
如何验证我的云功能的域?
我已经尝试过这种方法,但仍然得到 401:
解决方案
推荐阅读
- java - 处理 - 将 mousePressed 添加到具有 100 个球的动画中
- python - Discord.py 为 on_member_join 事件启用 Intent
- php - 如何自定义我的 Laravel 电子邮件验证消息
- reactjs - React Table 未更新其值
- java - 导出到可运行 jar 后无法读取图像
- c - 两个结构初始化之间的区别
- azure-devops - 2+ Gb 工件的下载管道工件任务超过 100%
- java - Drools:比较 Drools 决策表中相同类型的对象
- rust - 转换选项
到一个选项 > - node.js - nodejs/npm - 使用 vpn 时包不工作