Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Issue with Jira Api using NodeJS

shakir ullah May 12, 2017

Hello Everyone,

I am facing problem when i try to create an jira issue in nodeJs Api. it give me Following Error.
I am using Oauth for Authentication.


oauth_problem=signature_invalid&oauth_signature=e7f1begkIuYdrDrVgfCSMeIMGu4U6L5EFivxKUh7XpgwkXiGrsGO1VyX0DiW5R%2B61WaRv4H3vwdUGjf0Y3ABghjepTD3gSjVfOoqh9s7Gio5Tj2MxSMnnx%2FDWR0U3tKTRov2UAV1tmc96C03%2BBdlvu8YUVQU0PP7FHkS5mfqfJnR2W4S2WkFVHUVaq856eGVY%2B5Rdba5SY0df6R%2BchIbcvigut48mt5pkovf3u9MR88xH6wI%2BkFilr7PVMpF4wzbQHK4MJnOfZD2E%2BN83RMGW0fMrYRJCXtCGCmi9ZX%2FOId%2Bcw%2FUlgvIhg1Ba8oWpEkm9ee6kp3Ni2n1hMTuU%2FK3LQ%3D%3D&oauth_signature_base_string=POST%26https%253A%252F%252Fblameless.atlassian.net%252Frest%252Fapi%252F2%252Fissue%26fields%253D%2526oauth_consumer_key%253Dabcde%2526oauth_nonce%253DZxYnMUftfrkptrz7PA69MpkA5nR6exPH%2526oauth_signature_method%253DRSA-SHA1%2526oauth_timestamp%253D1494572935%2526oauth_token%253DMS7v1GgzIx93yOa2HQJRMsMHXAVDzV2u%2526oauth_version%253D1.0&oauth_signature_method=RSA-SHA1

I am follwing the NodeJs example code(https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples) jira mention in Api Doc.

GET request is doing fine but There is problem with POST requests.

I Create an Application Link for Oauth with Application Url = http://blameless-api.herokuapp.com. This is where my Api is hosted.

My Issue Creation Code:
var consumer =
new OAuth(req.body.baseUrl + "/plugins/servlet/oauth/request-token",
req.body.baseUrl + "/plugins/servlet/oauth/access-token",
req.body.consumerKey,
"",
"1.0",
req.body.callback,
"RSA-SHA1",
null,
req.body.privateKey);
consumer.post(req.body.baseUrl + "/rest/api/2/issue",
req.body.token,
req.body.tokenSecret,
data,
"application/json",
function(error, data, resp) {
console.log(data);
// data = JSON.parse(data);
res.send(data);
}
)

3 answers

0 votes
alamrezoanul August 22, 2019

Hey guys, any update on this? I'm also stuck.

0 votes
Sam Havens
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2017

Here is a project I plan on using... haven't tested it yet though https://github.com/nicolasbettag/create-jira-ticket-api

kallu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2018

This is not working please give me some reference

0 votes
Anil singh May 12, 2017

Hi 

I have a link to create issue using node js. you can follow the link hope it will helpful for you.

https://developer.atlassian.com/articles/create-an-issue/

 

Thanks 

Anil Singh

Programmer Analyst

http://www.mirketa.com/

kallu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2018

Hi , i am creating JIRA issue using node js but your code is not running ... please help me some documents

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events