WorkOS:‘Agent需要上下文,集成即交付’WorkOS: ‘Agents Need Context. Ship the Integrations That Give It to Them.’
WorkOS提出多阶段AI Agent的核心痛点在于缺乏实时上下文访问,需通过预建集成(如GitHub、Slack、Salesforce)解决OAuth和令牌生命周期问题。WorkOS Pipes平台直接连接用户常用工具,避免多周开发延迟。
让您的客户将第三方账户连接到您的应用程序。
简介 Pipes 允许用户安全地将他们的第三方账户连接到您的应用程序。借助 Pipes,您可以轻松集成 GitHub、Slack、Google、Salesforce 等流行服务,而无需管理 OAuth 流程、令牌刷新逻辑或凭证存储。
配置提供方 要让用户可以使用某个提供方,您需要在 WorkOS 仪表板中对其进行配置。 请前往 WorkOS 仪表板的 Pipes 部分开始操作。点击“连接提供方”,然后从列表中选择所需的提供方。如果您未看到所需提供方,请联系我们的团队。
自定义凭据 使用您自己的 OAuth 凭据配置提供方: 在提供方的仪表板中创建一个 OAuth 应用。 您可以在设置模态框的文档部分找到有关如何设置该提供方的说明。
在配置提供方时使用提供的重定向 URI。
从提供方获取客户端 ID 和密钥。
指定您的应用程序所需的权限范围(scopes)。 您可能还需要在提供方的配置中也设置这些权限范围。
提供一个可选描述。该描述将用于小部件中,告知用户您的应用程序将如何使用他们从提供方获取的数据。
一旦用户连接了某个提供方,您就可以从后端获取访问令牌,代表用户向已连接的服务发起 API 调用。Pipes 会在需要时自动处理令牌的刷新,因此您将始终获得一个有效的令牌。如果令牌存在问题,端点将返回有关问题的信息,以便您引导用户进行修复。这可能要求用户直接重新授权,或通过包含 Pipes 小部件的页面进行操作。
探索 Pipes 集成的第三方提供方
下一步
The description in the widget is set in the provider’s configuration in the WorkOS Dashboard.
Fetching access tokens
Once a user has connected a provider, you can fetch access tokens from your backend to make API calls to the connected service on their behalf. Pipes takes care of refreshing the token if needed, so you’ll always have a fresh token. If there’s a problem with the token, the endpoint will return information about the issue so you can direct the user to the correct it. This may require sending the user to re-authorize directly or via the page with the Pipes widget.
ProvidersExplore the third-party providers available for Pipes integrations
Up next
需要完整排版与评论请前往来源站点阅读。