【发布时间】:2019-03-25 01:11:22
【问题描述】:
我正在使用 Actions On Google 制作智能家居应用。我目前有一个 Firebase 云函数,它通过 Request Sync 请求调用 HomeGraph API。
函数内容如下:
const {smarthome} = require('actions-on-google');
const app = smarthome({
key: "(My Key)"
});
//Assume UID is the id of the user that we are requesting a sync for
app.requestSync(uid).then((res) => {
return;
}, (e) => {
console.error(e);
});
在此函数的日志中,我收到错误消息:
{ "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" } }
此错误似乎是标准的 Google API 权限被拒绝错误响应,但它何时会在 Request Sync HomeGraph API 调用中发生?
【问题讨论】:
标签: google-api actions-on-google google-smart-home