Trying to make a GET request to the REST API using Jira API token. Works on the browser through google extensions using the SAME token. I literally copied the request to make sure I was not messing something up. Yet, it doesn't work still.
Through the browser and/or Google Extensions that makes this same request I receive:
Through Postman or any code OUTSIDE the browser:
Error: "Field 'worklogAuthor' does not exist or this field cannot be viewed by anonymous users."
I tried everything I could think of, don't know what else to do. Tried even using the the same "User-Agent" and Cookies as the browser uses to make the request...What am I missing? It must be something really obvious.
The reason that you're able to make API calls from your browser is because of the session data stored in cookies. Replicating the exact cookie jar and request details coming from your browser in a REST API client like Postman isn't an exact science.
The recommendation would be to use basic authorization for making REST API calls in Postman.
If you're running Jira Server (on-prem): https://developer.atlassian.com/server/jira/platform/basic-authentication/
If you're making a call against Jira Cloud, you'd use basic auth but with an API token:
Thank you. If possible can you give me a hint on how can I find out if I'm dealing with Jira server or Jira Cloud? From the url of my company it seems like I'm dealing with cloud, since it's `jiracloud.mycompany.com`. Am I correct or there's another way to find this out?
@Bruno Mayol Giannoti sure.. just hit the /rest/api/2/serverInfo endpoint, and if you see deploymentType: "Cloud" then it's a cloud instance.
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
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