Jira Server API Postman Configuration

Dan Siegel April 28, 2020

I followed the instructions on https://developer.atlassian.com/server/jira/platform/oauth/ with the sample java code. The sample java code saved a config file to config.properties.

secret=xxx
jira_home=xxxx.com
consumer_key=xxxx
private_key=xxxxx
request_token=xxxxx
access_token=xxxxx

 

I am able to access using the java methods supplied in the documentation, but I'm having no such luck with Postman. I am either getting either:

  • oauth_problem=signature_method_rejected
  • oauth_problem=token_rejected

I think I may just have the config wrong in Postman. I have tried:

  • Postman: Consumer Key: consumer_key
  • Postman: Consumer Secret: private_key, secret
  • Postman: Request Token: both request_token, access_token
  • Postman Access Token: both request_token, access_token 

 

image.png

 

I've tried a number of combinations, so I am wondering if either I am missing something or if I am simply just putting the wrong values into the corresponding spots in Postman.

 

3 answers

1 vote
Peter Nielsen December 8, 2020

Hi,

I really struggled with this but finally made it work using authentication in Postman and coping data from the working Jira example application 

https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/ 

using 

  • OAuth 1.0
  • Request headers
  • Signature method as RSA-SHA1
  • Consumer key from the example properties
  • Access token from example properties
  • Private key from the generated .pem file
  • Tick 'Encode the parameters in the ....' under Advanced settings

Just to let others know :-)

0 votes
Dan Siegel December 8, 2020

I ended up using the Jira python library and creating a oauth function in python:

 

def oauth():    
key_cert_data 
= None
with open('jira_privatekey.pem''r'as key_cert_file:
key_cert_data = key_cert_file.read()    
oauth_dict 
= {
'access_token''',
'access_token_secret''',
'consumer_key''OauthKey',
'key_cert': key_cert_data
}
return oauth_dict
0 votes
Dan Siegel May 4, 2020

For those who come across this post in the future, I was never able to quite solve the issue with Postman, but I came across this post which was helpful:

https://community.atlassian.com/t5/Jira-questions/REST-Api-Oauth-python-oauth-problem-signature-method-rejected/qaq-p/657212

And this python library helped quite a bit as well: https://jira.readthedocs.io/en/latest/index.html

Josh Nader June 19, 2020

Put the Consumer key( the one that you entered in Applications Links when setting up the Application URL) and

oauth_token & oauth_secret in the Header section of the Postman call , keep the Authorisation Type as No Auth.

 

This worked for me.

Suggest an answer

Log in or Sign up to answer