Hi, i have a oauth2.0 access token obtained via authentication flow and by using it am trying to access this 'get all boards' api.
https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-get
i also noticed only 'platform' apis are working with this access token and all these 'software' type api's are not working.
On a logged in browser when i access this on browser... i was able to get the response on browser screen.
https://myaccount.atlassian.net/rest/agile/1.0/board
But via php curl call am unable to. Here is my code. the $result_decode['access_token'] is carrying valid access token.
appreciate any help here.
$ch = curl_init();
$allboards = $site_url.'/rest/agile/1.0/board';
echo '<br /><b>Calling all boards link:</b>'.$allboards.'<br />';
curl_setopt($ch, CURLOPT_URL, $allboards);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Accept: application/json',
'Authorization: Bearer ' . $result_decode['access_token']
]);
$allboardsdata = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo 'code:'.$httpcode.'-----<br />';
var_dump(json_decode($allboardsdata));