【发布时间】:2017-01-05 17:35:50
【问题描述】:
我正在为“Actions on Google”与 API.AI 的集成开发帐户链接集成,以便与 Google Home 一起使用。当我在模拟器中测试这个代理时 (https://developers.google.com/actions/tools/web-simulator)
正如所料,这是我的回应:
{
"response": "It looks like your conference manager account is not linked yet. You can link conference manager to your Google Account from the Google Home app.",
"audioResponse": "//NExAARC..."content_copy,
"debugInfo": {
"sharedDebugInfo": [
{
"name": "Account Linking Url",
"debugInfo": "https://assistant.google.com/services/auth/handoffs/auth/start?provider={project-id}_dev&return_url=https://www.google.com/"
}
]
}
}
但是,当我关注
res.debugInfo.sharedDebugInfo[0].debugInfo
链接,我得到标准 redirect_uri_mismatch 错误页面,详细信息:
请求中的重定向 URI, https://oauth-redirect.googleusercontent.com/r/my-project-id, 与 OAuth 客户端授权的不匹配。访问 https://console.developers.google.com/apis/credentials/oauthclient/my-client-id?project=my-client-id 更新授权的重定向 URI。
当然不可能将 googleusercontent 域添加到 重定向,这不是我在我的 API.AI Actions on Google 集成。
在 API.AI 方面,我的 Auth Url 是标准的 Google 网址:
https://accounts.google.com/o/oauth2/v2/auth
我的令牌 URL 是:
https://myendpoint.com/google-home-token-endpoint
范围填写为calendar
在 google 开发者控制台上,我将令牌 URL 设置为与 API.AI 中的相同,项目 ID/客户端 ID 与请求中的引用相同。
这是一个已知问题吗?我可以尝试其他调试工作吗?
【问题讨论】:
-
目前您只能将 OAuth 与您拥有的 API 的操作一起使用。
-
@LeonNicholls 我想我明白了……这意味着我们目前无法将用户的 Google 帐户关联到“Actions on Google”与 API.AI 集成?
-
是的,没错。
标签: actions-on-google google-home api-ai