由于 2-legged 令牌错误,无法完成 Workato 配方

Unable to complete Workato recipe due to 2-legged token error

我在工作,有一个在 CSV 有更新时解析 CSV 的方法。检测到后,配方会提取文件内容,并将这些内容与从 Autodesk Construction Cloud 帐户中提取的公司进行比较。

在提取公司之前,我根据这篇文章获得了一个双足 oauth 令牌: https://forge.autodesk.com/en/docs/oauth/v1/reference/http/authenticate-POST/

但是,当 运行 请求提取公司时,我得到一个错误 "403 Forbidden: {"code":1003,"message":"Only support 2 legged access token."}"

关注本文: https://forge.autodesk.com/en/docs/bim360/v1/reference/http/companies-GET/

我的输入请求结果为:

{
response_type: json,
path: https://developer.api.autodesk.com/hq/v1/accounts/[my account id (yes, I trimmed the "b.")]/companies,
output: [{"name":"id","type":"string","optional":false,"control_type":"text"},{"name":"name","type":"string","optional":false,"control_type":"text"}],
request_headers:  [
 {
name: Authorization,
value: Bearer [access_token gained from previous step]
}
],
Action name: GET Companies,
Method: get
}

解决方案不是使用 BIM 360 连接,而是设置自定义 HTTP 连接。我用那个connected拿到了2-legged token,然后又用那个connection把之前失败的get请求放到了