Hy
I made this script in php
$post = [
‘tenancyName’ => ‘---------------’,
‘usernameOrEmailAddress’ => ‘-------------’,
‘password’ => ‘-----------------’,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘https://platform.uipath.com/api/account/authenticate/’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
$json = json_decode($response, true);
echo $ReleaseKey= $json[‘result’];
curl_close ($ch);
$post = [
‘ReleaseKey’ => 'Bearer '.$ReleaseKey,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ‘https://platform.uipath.com/odata/Releases’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
$json = json_decode($response, true);
var_dump($json);
curl_close ($ch);
but I received this response: You are not authenticated!
[“message”]=>
string(26) “You are not authenticated!”
[“errorCode”]=>
int(0)
[“result”]=>
NULL
[“targetUrl”]=>
NULL
[“success”]=>
bool(false)
[“error”]=>
array(4) {
[“code”]=>
int(0)
[“message”]=>
string(26) “You are not authenticated!”
[“details”]=>
string(73) “You should be authenticated (sign in) in order to perform this operation.”
[“validationErrors”]=>
NULL
}
[“unAuthorizedRequest”]=>
bool(false)
["__abp"]=>
bool(true)
Do you know what is a problem?