The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Getting the response below when making the a request to get an Issue from Jira by Key.
errorMessages":["Issue does not exist or you do not have permission to see it."]
I don't believe its a permissions issue as I'm able to get it to work perfectly fine in Postman, yet when I follow the documentation on this page: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
I get the above response.
Note: I'm using an Admin Account for the Free tier of Jira.
Hi @Zackary ,
The error message is clear about the issue and it is either the account that is trying to make a rest call does not have access to browse the project's issue, or application access or the issue is deleted. Are you using the same type of authentication/credentials in postman as well?
What is the GET restapi call that you are using?
Yes I'm using the same credentials in postman and PHP.
Using Basic Auth:
Authorization: Basic b64_encode([username]:[api_token])
Postman:
// Using Unirest\Request
public function getIssue($issue_id){
$headers = array(
"Accept" => "application/json",
'Authorization' => 'Basic ' . env('JIRA_B64_TOKEN')
);
$response = Request::get(
$this->host . 'issue/' . $issue_id,
$headers
);
var_dump($response);
}
Issue does exist:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Zackary - Can you try using the below code - using API token
// This code sample uses the 'Unirest' library:
// http://unirest.io/php.html
Unirest\Request::auth('email@example.com', '<api_token>');
$headers = array(
'Accept' => 'application/json'
);
$response = Unirest\Request::get(
'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
$headers
);
var_dump($response)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried using that and still I'm getting the same error stating that the user doesn't have permissions or the issue doesn't exist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.