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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
Hope that helps!
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.