Automation Suite
2021.10
False
横幅背景图像
Automation Suite API 指南
上次更新日期 2024年4月19日

ROPC 身份验证

重要提示:

我们支持通过 ROPC 进行身份验证,以便向后兼容已从独立部署迁移到 Automation Suite 部署的 Orchestrator 实例。

只有 主机管理员 才能使用 /api/account/authenticate/ 端点进行身份验证。

企业用户 应使用 进行身份验证。

资源所有者密码凭据身份验证方法是租户作用域,因此外部应用程序将无法使用此方法进行身份验证,因为无法在租户级别创建外部应用程序。

要检索访问令牌,请使用以下负载向 BaseURL/[OrgName]/[TenantName]/api/account/authenticate 端点发出 POST 请求:
{
    "TenancyName": "{account_tenant_name}",
    "UsernameOrEmailAddress": "{account_username}",
    "Password": "{account_password}"
}{
    "TenancyName": "{account_tenant_name}",
    "UsernameOrEmailAddress": "{account_username}",
    "Password": "{account_password}"
}

在上述请求中:

  • {account_tenant_name}- 是您的 Automation Suite 帐户中租户的名称
  • {account_username}- 是您的 Automation Suite 帐户的用户名
  • {account_password}- 是用于登录 Automation Suite 帐户的密码
提示:

要查找 Orchestrator 实例的 TenancyName 值,请向 /odata/Users/UiPath.Server.Configuration.OData.GetCurrentUser发出 GET 请求。

响应正文返回持有者令牌,您的应用程序使用该令牌来授权进一步的 API 调用。 因此,在 API 调用的“授权”标头中,附加 Bearer xxxx 并将 xxxx 替换为 {access_token} 值(例如 Authorization: Bearer eyJhbG ... LnVxjA)。
{
    "result": "{access_token}",
    "targetUrl": null,
    "success": true,
    "error": null,
    "unAuthorizedRequest": false,
    "__abp": true
}{
    "result": "{access_token}",
    "targetUrl": null,
    "success": true,
    "error": null,
    "unAuthorizedRequest": false,
    "__abp": true
}
重要提示:

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.