Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

OAuth error while sending the access token in header

Harshita Rukhaiyar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2018

Hi,

I am getting this error  "{"errorMessages":["You do not have the permission to see the specified issue.","Login Required"],"errors":{}}" {"errorMessages":["You do not have the permission to see the specified issue.","Login Required"],"errors":{}} while I am trying to fetch an issue from the JIRA.

For fetching the issue I am using CURL in PHP. Please find the code below:

curl_setopt_array($curl, array(
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://<jira server url>/rest/api/latest/issue/<issue id>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => array('Accept: application/json',
'Content-Type: application/json','authorization: Bearer <access token>'
),
));

The access token is working fine as I am able to get the response through insomnia. Kindly suggest me how to resolve this

0 answers

Suggest an answer

Log in or Sign up to answer