The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Setting headers in the POST callback of a Webhook

laramarinha
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!
April 8, 2016

I am trying to trigger a build of a Jenkins job through a JIRA webhook. But I am getting a 403 error, which mean it is missing the authentication token in the POST request. Is there any way to set headers in the webhook URL?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
laramarinha
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!
April 10, 2016

Hi,

Thank you for the reply. But how can I set that header in JIRA? Because it is only possible to set the URL in the webhook configurations. 

Richard Clarke
March 11, 2020

I agree on Jira Cloud, we need a definitive answer from Jira.

as of 11-03-2020 this is STILL not possible!  why?......

0 votes
Aleks Yenin (Polontech)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 8, 2016

Hello Lara,

Here is the needed headers

:
BASE64Encoder base=new BASE64Encoder();
String encoding = base.encode ("username:password".getBytes());
postRequest.setHeader("Authorization", "Basic " + encoding);
postRequest.setHeader("X-Atlassian-Token","nocheck"); 

TAGS
AUG Leaders

Atlassian Community Events