OAuth POST fails with oauth_problem=signature_invalid but GET passes Edited

I am facing an issue in my Node Application. While making a POST request to create Issue endpoint, it always fails with oauth_problem=signature_invalid.

But when I make a GET request to other endpoints, it works.

My code:

const fs = require('fs');
const OAuth = require('oauth').OAuth;
const config = require('./config');
var payload = {// ... };

const consumer = new OAuth(
    fs.readFileSync('./keys/jira_privatekey.pem', 'utf8'),

consumer.post(`${config.baseUrl}/rest/api/2/issue/`, config.accesToken, config.tokenSecret, payload, (e, data, resp) => {


I double checked the URLs, and all of them are correct.



2 answers

This widget could not be displayed.
Gonchik Tsymzhitov Community Champion Oct 06, 2017


Please, have a look this knowledge base:




Gonchik Tsymzhitov


Please correct me if I am wrong:

Base URL is where my JIRA is hosted. eg: dev.domain.org.com

Following this tutorial, I have set my Application URL to http://example.com

As you can see above in code, I have passed as http://example.com.


Am I still missing something? This is a console application, its not behind firewall or nginx proxy.

But my node is not hosted anywhere, its a console application. How will I get the node app link?


I generated access token using this guide

Nirajmchauhan have you found a solution for this? I am in the exact same position as you?

This widget could not be displayed.

Hi Guys, 

Any update on this....Facing the same issue

So one thing that was messing up my consumer connection was that my post body wasn't a string so then in the consumer library it was changing the 'applicaiton/json' type to a different content type and that was why it was failing. 





*edit for emphasis

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

189 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you