什么是授权重定向 URI?

What is Authorized Redirect URI?

我目前正在使用 Zeit.co 作为我的前端托管,Firebase 数据库,Google 作为后端功能,我想集成名为 Zoho 的第 3 方 CRM。

作为从 Zoho 获取访问代码的初始过程的一部分,Zoho 的强制参数包括 client_idgrant_typeclient_secretAuthorized Redirect URI。我能够直接从 Zoho 生成所有参数,Authorized Redirect URI 除外。据我所知,此 URI 是 Zoho 在授权客户端后将使用授权代码将 Web 浏览器重定向到的端点。

设置过程类似于此 link 中指定的示例,除了我没有使用 Calendly,对于那些需要特定示例的人。它实质上详细说明了 CRM 如何需要上述参数并使用获得的访问令牌设置 Google 函数端点。

Zeit 的文档here indicates that the URI should be https://zeit.co/oauth/authorize。但是,当我通过 Postman 发送请求时,返回的响应为:

{
    "error": "invalid_redirect_uri"
}

如何获得Authorized Redirect URI?它来自前端平台吗?或者它是我可以从另一端获得的东西,在这种情况下是 CRM?

来自Zoho's documentation:

授权重定向 URI

It is the callback URL that should be given while registering your app with Zoho. This determines where the API server has to redirect the user after completing the authorization flow. The value of this parameter must exactly match with one of the redirect_uri values that is listed for your project in the Zoho's Developer Console. Please note that the redirect_uri should be character perfect i.e., the HTTP or HTTPS, case, and trailing slash ('/') of the redirect URLs must all match.


例子

http://www.example.com/oauth2callback

可以找到更多信息 here。希望对您有所帮助!