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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.