Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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'),
    "RSA-SHA1");`${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.



5 answers

0 votes


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:

Following this tutorial, I have set my Application URL to

As you can see above in code, I have passed as


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

Application url is node app link. 

Just try to generate under this docs

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?

Like Ben Pearson likes this

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

// here 1. post_body in string
// 2. project key
//3. issuetyepe :Not all project in jira have same issue type as Bug. may some project not support issuetype as Bug
// check correct issue type allowed to project.

    var postBody= `{
                     "fields": {
                     "project":{ "key": "PROJECT_KEY_HERE"
                     "summary": "using JIRA REST API",
                     "description": "Creating of an issue using project keys and issue type names using the REST API", 
  "issuetype": {                              
"name": "Bug"                           

function (errordata) {
//handle your error and data


This is late but may helpful to some one.

Hi guys,


I dig up an old topic, but today I'm facing exactly the same issue, after having followed this topic:

The symptom is the same: POST fails with 401 error as per the sample provided in the link of above, when I execute a simple requestToken.


But changing it to GET works, or a kind of as it returns null string:Untitled1.png

I also tried to set up useBodyEncodingForURI to false as described here, but it changed nothing.

What can be the root cause for that ?

Thanks for your help



worked for you? I am stuck exactly here.

Not yet.

I switched to something else, but I guess the code needs to be refresh. This is something I'll try later

I had this issue as well. In my case, the problem was solved by adding a 'Content-Type' header specifying 'application/json'. Seems like a case of incorrect error reporting; the signature was in fact fine (as others have stated), but the way JIRA (in my case) extracted the signature broke down when it didn't understand the request payload.

Suggest an answer

Log in or Sign up to answer

Community Events

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

Events near you