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

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 Leaders.
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"); 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events