Mat Smith
asked on
calling Jira create API from node js from AWS
Hi,
I've just built functionality in my Node.js app that allows me to create Jira issues via Jira API. I'm using simple login with e-mail address and token + 'request' library to make requests. It works great when I launch it from in my local environment but I keep on getting 401 - Unathorized when I deploy the app to AWS EC2. What could be the reason for this issue? Below is the example request that works when fired locally:
The only thing that was coming to my mind is the request origin, that might be different when firing requests from AWS.
I've just built functionality in my Node.js app that allows me to create Jira issues via Jira API. I'm using simple login with e-mail address and token + 'request' library to make requests. It works great when I launch it from in my local environment but I keep on getting 401 - Unathorized when I deploy the app to AWS EC2. What could be the reason for this issue? Below is the example request that works when fired locally:
const headers = {
'Authorization': 'Basic ' + Buffer.from(jiraUser + ':' + jiraPassword).toString('base64'),
'X-Atlassian-Token': 'no-check',
'Content-Type': 'application/json',
};
[code]router.get('/jira/priority', AuthGuard.verify, (req, res, next) => {
request.get({url: jiraUrl + 'priority', headers: headers}, (err, resp) => {
// logic
});
});
[/code]The only thing that was coming to my mind is the request origin, that might be different when firing requests from AWS.
ASKER
Hi Shalom,
Thanks for your message what do you mean by logging headers?
In the cloud-based Jira the whitelist feature is no longer available
Thanks for your message what do you mean by logging headers?
In the cloud-based Jira the whitelist feature is no longer available
Is there someplace in the Jira api where you have to authorize a domain or ip?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Jira should have no problem with AWS, unless your Jira manages IP whitelists.