JIRA OAUTH authentication


I am using JIRA API in my automation script. currently, am using Basic authentication for authenticating API calls with the server which requires username and password.

I want to switch to OAuth authentication and configured OAuth in JIRA web application using this doc

The above user guide uses jar file to generate an Access Token and is sent with each API call for authentication.

I cannot use that jar application(embed that code in my script) for generating an Access Token every time it gets expired.


  1. How to generate an Access Token?
  2. What are the headers to be set in the API call for using JIRA OAuth authentication.
  3. Header for sending Access Token for every API request.

I am using REST Template framework for making API calls.

Hello Abhinay!

Did you get solve this situation?

In my case, I use the generated token to try access from another place and its not working. Getting 401.

curl -D- -X GET -H “Accept: application/json” -H “Authorization: Bearer xxxxxxxxxxxxxxxxxxxx” “http://jirainstance/rest/api/latest/issue/TSQD-4640

{“errorMessages”:[“You do not have the permission to see the specified issue.”,“Login Required”],“errors”:{}}