We have a cloud Jira setup, authenticated via Google. I followed the docs and created a token. When I do a curl -v https://<my_company>.atlassian.net --user me@my_company:mytoken, I get a 302 redirect to /secure/MyJiraHome.jspa. There are no headers returned with a session ID or similar.
If I try to view an issue, I get a 404 error: Issue does not exist or you do not have permission to see it.
curl -v --user me@my_company.com:token https://my_company.atlassian.net/rest/api/2/issue/RM-399
And yet the issue is clearly visible on the web at https://my_company.atlassian.net/browse/RM-399.
What am I missing?
Technically, your curl command is correct and should return you the correct issue's data.
The 404 hints at an authentication problem, i.e. Jira doesn't know who you are and will simply pretend the issue isn't there. So, I am guessing that there is an issue with your token.
Also, curling 'https://<my_company>.atlassian.net' isn't much of test of your authentication, as it will always redirect you to '/secure/MyJiraHome.jspa' with 302, no matter if your credentials are good or not.
So, I suggest you check your API token or simply revoke the one you have and create a new one.
Hope that helps,
Thanks, Oliver, but it doesn't look like it's an authentication problem. Nothing changed when I got a new token.
One interesting thing: I tried listing my projects with
Got a response indicating there are 0 projects:
It's acting as if the API doesn't give me the same level of access to my company's projects as the web UI.
That's indeed quite strange. Have you tried accessing the API without any credentials – that should yield the same results as the ones you are describing.
If you are sure the credentials are correct, I really don't know what else to try. The API allowing for different levels of access for the same user would be news to me – although that would be an interesting feature. Anyway, it might be time for a support ticket.
Hi @Ken Freeman
I would recommend trying the same API call in Postman (either the online version or via the downloaded app). This will confirm whether you have an authentication issue or not.
Go with a simple API call like https://my_company.atlassian.net/rest/api/2/issue/RM-399 to get it working
Hi everyone! My name is Jenny, a Product Manager at Atlassian. After launching Team @mentions in Confluence, we heard a lot of positive feedback from customers that they love how easy it is to @men...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events