I am trying to use the Jira REST api to pull data from a Jira project into another app. I have been following the documentation here https://developer.atlassian.com/cloud/jira/platform/rest/v3/ and I have created a token for my account at this location https://id.atlassian.com/manage/api-tokens
When I use the following PHP code I get the error message "Issue does not exist or you do not have permission to see it."
$headers = array( 'Accept' => 'application/json', 'Bearer' => 'my-token-here' );$response = Unirest\Request::get( 'https://christaylordeveloper.atlassian.net/rest/api/3/issue/KM-299', $headers );
The token is for my own account and I can view this issue via the web. Why can I not view my issue via this REST API call?
Hi @Chris Taylor
I use C# for the API and don't know PHP, but there seem to be a couple of things missing / incorrect :
If you look at my reply in this post, there is some sample C# code which does all of the above (N.B. this is an old post, so change password for token
It may be useful to try this initially via Postman to get it working
I have switched to Basic authentication and it works perfectly. Thanks for the advice.
It looks like you're new here. Sign in or register to get started.