Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actions on google 从Google Home Simulator链接OAuth2帐户时重定向\u uri\u不匹配_Actions On Google_Google Home_Api Ai - Fatal编程技术网

Actions on google 从Google Home Simulator链接OAuth2帐户时重定向\u uri\u不匹配

Actions on google 从Google Home Simulator链接OAuth2帐户时重定向\u uri\u不匹配,actions-on-google,google-home,api-ai,Actions On Google,Google Home,Api Ai,我正在开发一个帐户,链接“谷歌行动”与API.AI的集成,用于谷歌主页。当我在模拟器中测试此代理时() 正如所料,这是我的回答: { "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

我正在开发一个帐户,链接“谷歌行动”与API.AI的集成,用于谷歌主页。当我在模拟器中测试此代理时()

正如所料,这是我的回答:

{
    "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
链接,我得到标准的重定向\u uri\u不匹配错误页面,详细信息如下:

请求中的重定向URI, 我的项目id, 与为OAuth客户端授权的不匹配。参观 我的客户id?项目=我的客户id 更新授权的重定向URI

当然,不可能将谷歌用户内容域添加到 重定向,而这不是我在 API.AI对谷歌整合的行动

在API.AI端,我的认证Url是标准的Google Url:
https://accounts.google.com/o/oauth2/v2/auth

我的令牌URL是:
https://myendpoint.com/google-home-token-endpoint
范围填写为
calendar

在GoogleDeveloper控制台上,我将令牌URL设置为与API.AI中的相同,并且项目id/客户端id与请求中的引用相同


这是一个已知的问题吗?我可以尝试其他调试工作吗?

请参阅Leon对我最初问题的评论


目前不可能为您不拥有的API使用操作进行帐户链接。

我也不明白为什么您不能通过登录Google在Google上为操作进行帐户链接

但是,我使用Amazon登录完成了这项工作,以下是如何实现的:

  • 在api.ai中,在google上选择集成->操作
  • 选择调用名称在中创建项目
  • 输入相应的google项目ID
  • 选择你的欢迎意向
  • 在允许的来源下,将
  • 在允许的返回URL下,放置(带 您的谷歌项目ID(如上所述)
  • 在Google弹出的Actions中,输入在Amazon开发者控制台中创建的客户端ID和客户端密码
  • 设置授予类型=隐式
  • 设置授权URL=

  • 设置范围=配置文件

  • 授权并预览,然后按照问题中的说明继续粘贴res.debugInfo.sharedDebugInfo[0].debugInfo到浏览器会话的链接。它将成功链接到关联的amazon帐户

  • 问题是-为什么我可以使用亚马逊作为身份提供商,而OAuth2使用web identity federation,而不是谷歌在谷歌上设置与Actions链接的帐户?

    目前,您只能将OAuth与您拥有的API的Actions一起使用。@LeonNichols我想我明白了……这意味着我们无法将用户的谷歌帐户链接到“谷歌行动”目前与API.AI的集成?是的,这是正确的。