Using Jira API from Postman via OAuth

Tomáš Vrabec January 15, 2018

Hi there,

for some reasons, need to access production at customer Jira with enabled websudo.

Would like to use Postman and Rest API.

Using Basic auth is working, but I don't like that as final solution. 

Anyone know how to setup token solution with OAuth or session?

Tried few steps via linked applications, but without any success. 

3 answers

3 votes
Sam Ogden February 11, 2019

I got it working using the postman desktop client. 
The documentation here gives all the information, but in a pretty convoluted way. 


Create the app as in the doco, make sure you copy the client ID and secret. 
Also, make sure that you've added the Jira platform REST API and allowed the scope you need in that.

In postman, open a new request, then in the authorization tab:
    Type = Oauth 2.0
    Get New Token
This was the bit that required a bit of trial and error: 
Callback URL = whatever.
Access URL = https://auth.atlassian.com/authorize?audience=api.atlassian.com
Access Token URL = https://auth.atlassian.com/oauth/token
Client ID and Secret as from before. 
Scope - the doco covers this pretty well. 

The request token should generate and fill in the token field. 
On the left hand side you'll need to add authorization data to Request Headers. Make sure you update this whenever you get a new token. 

From there you need to make a call to https://api.atlassian.com/oauth/token/accessible-resources to get the cloud ID for the sites accessed by the app. Make sure to use the token here.

Now you can finally make actual calls - just follow 3.2 on in the doco.

Deleted user February 12, 2019

Thanks for the post, but the original post was meant for server Jira. :-( 

Sam Ogden February 12, 2019

Ah, apologies. No help here then, sorry!

0 votes
Sandy Garrido October 24, 2018

I too, would like to find a way to connect postman using oauth successfully, I've been going around in circles with the documentation. Basic auth does work but would prefer to use oauth, either as an app or not.

0 votes
Sebastian Kleinholz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2018

Probably this link can help further.

Deleted user February 6, 2018

Still not able to made it works with Postman. There is an OAuth implementation, but I would assume, that it have to be kind of magically configured. Will try to reach postman support. 

Like Dobrivoje Prtenjak likes this
Matthew Amundson October 2, 2018

Hey Tomas,

Could you please share how you got a session started using Postman?

Thanks

Deleted user October 2, 2018

Hi Matthew,

still using basic auth for API calls. 

Was unable to determine successful oauth setting and my time resources was and still are very limited. 

If you would find it out, please, share with community over there.

Like Cheima likes this
Ankita Singh November 13, 2018

Hi Tomas,

Can you please share how you manged to use JIRA API from POSTMAM via basic auth? I need to hit JIRA APIs from POSTMAN.

Thanks!

Tomáš Vrabec November 17, 2018

Hi Ankita, its quite easy, you just have to use user account with appropriate credentials. Of course the instance have to be set to accept API calls and return results. Do you have some concrete problem I can help you with?

Скрундь Дмитрий April 26, 2019

Could you show how request will look like in postman ?

Deleted user December 16, 2019

{
"fields":{
"project":
{
"key":"TO"
},
"summary":"TEST-API",
"description":"Test Incident",
"issuetype":{
"name":"Issue"
}
}
}

Suggest an answer

Log in or Sign up to answer