Forums

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

Unable to make a post to jira from a local slackbot

jslot
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!
July 24, 2019

Hello, I am in need of some desperate help. I changed my password through Jira and now I'm unable to make a post request to Jira. I can get it to work in postman but I am unable to get it to work in the slack bot. I don't think our code has change except I've switched up my password on the request including the basic auth. Any help would be greatly appreciated. When I use my user name I error at the end as ```Basic Authentication Failure - Reason : AUTHENTICATED_FAILED<``` When I use my email I see ```Basic Authentication Failure - Reason : OK<``` which doesn't make any sense at all. Here is my code and as I've already stated this works when I do it through postman and I've encrypted my user name password as basic64 ala BASIC alsdfjasdfjwe. 

 

var options = {
method: "POST",
uri: URI,
headers: {
"Authorization" : "<Basic sdjfowiefalsdf>",
"Content-Type": "application/json"
},
body: {
"fields": {
"project":
{
"key": KEY
},
"summary": title,
"description": description,
"issuetype": {
"name": "Bug"
},
"labels": [KEY]
}
},
json: true,
family: 4
};

rp(options)
.then(function (parsedBody) {
createTicket.reply(
"SUCCESS!!"
);
})
.catch(function (err) {
createTicket.reply(
" FAILURE..." + err

);
})

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events