无论如何,这将被弃用...... :(实际上我现在必须尝试的是设置一个外部应用程序,我这样做了。我还创建了一个这样的访问令牌:
function getAccessToken() {
var data = {
'grant_type': 'client_credentials',
'client_id': '****',
'client_secret': '*****',
'scope': 'OR.Machines'
};
var header = {
'method': 'post',
'payload': data,
};
var response = UrlFetchApp.fetch("https://cloud.uipath.com/identity_/connect/token", header);
Logger.log(response);
var messageContent = response.getContentText();
var result = JSON.parse(messageContent);
var access_token = result['access_token'];
return access_token;
}
现在我现在尝试做的是获得一个流程释放密钥,然后我可以用它开始工作......出于测试原因,我尝试使用 curl: curl -H "accept: application/json" -H "Content-类型:application/json" -H "X-UIPATH-TenantName: [tenantName]" -H "X-UIPATH-OrganizationUnitId: default" --insecure -v https://cloud.uipath.com/[organization]/[ TenantName]/odata/Releases?$filter=ProcessKey" -H "Authorization: Bearer [accesstoken]" 实际上我在返回中看到的是 400 Bad request...我做错了什么?