Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,417,988
Community Members
 
Community Events
171
Community Groups

how to provide Bearer token in webhook url

Hi

We have exposed a API to process the updates made on issue which needs an Bearer token for authentication.

I would like to call this service using webhooks . Is there any way i can provide the authentication token in the webhook URL ?

i am getting 401 error as i didnt specify the token

3 answers

1 accepted

0 votes
Answer accepted
Daniel Eads Atlassian Team Mar 04, 2019

Hi Abhinay,

Currently Jira Cloud does not support sending basic auth over webhooks. There's an open feature request here to provide that functionality: JRACLOUD-31953

If your API accepts tokens as part of the URL, you can simply tack that on at the end of the URL you've entered in Jira. As an example, your service might have an endpoint of

https://service.yourdomain.com/services/hooks/incoming

and if it supports accepting tokens via query string, you might be able to just append them on the URL:

https://service.yourdomain.com/services/hooks/incoming?token=599lm8lXxJkR82152KMzrkq8 

This depends highly on what the service at the other end is. If it's something your company has developed internally, talk to the developer responsible for it and see if they have built it in a way that will accept the token in the URL vs only accepting over a basic auth header.

Cheers,
Daniel

Hi Daniel ,

Thanks for a quick response. Below is our full requirement.

we need to trigger an API when ever any updates(comments ,status changes etc) occur on a jira issue.

The API can only support oauth(using Bearer Token ). We thought of achieving this using webhooks , but we are stuck with passing the authentication headers. If you are saying that we cant pass headers on webhooks, then is there any way we can trigger the API , for any updates on JIRA issue ?

 

From postman we just pass below header for the API

Authorization : Bearer XXXXXXXXXXXXXXXXXXXXXX

 

Thanks

Abhi

Hey Abhi,

I've gone around a bit on the Jira Cloud webhooks and confirmed there's not currently a way for a Jira Cloud webhook to send something directly to your API in the way you've described. It comes back to that JRACLOUD-31953 issue that's currently open.

However, I think there's a possibility for you to use Zapier if you don't mind some glue between Jira and your API.

image.png

Using the Zapier apps for Jira Cloud and Webhooks, you can have Zapier retrieve the issue updated event from Jira and pass it on to your API. The "Webhooks by Zapier" app includes the options you need for headers under its Custom Request event type. It's an extra layer in the process, but should get you the results you're after.

image.png

Hope that helps!
Daniel

2 votes
Darryl Lee Community Leader Oct 29, 2020

Sorry to revive this old thread, but Automation for Jira (now included with Cloud) *does* support Headers, and indeed you can include Basic Authentication in there, as demonstrated here:

https://community.atlassian.com/t5/Jira-articles/Automate-online-site-backups-for-Jira-and-Confluence-without/ba-p/1271317

Whoops, wrong account.

Suggest an answer

Log in or Sign up to answer