Register Jira Cloud Webhook with REST API

Prakash Thete April 18, 2019

I want to register an JIRA Cloud webhook via REST API (no connect apps). I have gone through the https://developer.atlassian.com/cloud/jira/platform/webhooks/
But it seems that it only supports basic auth during webhook registration.

What I want is to register an webhook with access token in header as 

Authorization : Bearer <access_token>

But when I do post it like above it always returns 401 status code.

Below is the configurations i am trying :

URL :

 https://<subdomain>.atlassian.net/rest/api/3/webhook

Headers : 

Authorization : Bearer <access_token>
Content-Type : application/json

Body : 

{
"name": "my first webhook via rest",
"url": "https://www.example.com/webhooks"
}

 

 

2 answers

1 vote
Leslie Hernández G October 3, 2019

Hi, i want to use webhooks to notify teamcity when a issue change of status. It is possible ? 

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2019

Hello Prakash and welcome to the Community!

Congratulations on starting the creation of a webhook with Jira cloud. It seems you’ve made it rather far into this process and have run into an authentication problem. While you have stated you’re using a token for authentication, I would be interested to see if this works via basic authentication (The reason for this test is to ensure its not a permission issue we’re running into with the user account you’re using).

Please do let us know what happens when you attempt access while using basic authentication without a token.

Regards,
Stephen Sifers

Prakash Thete April 30, 2019

Hi @Stephen Sifers
I am able to register an webhook via basic auth.

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2019

Hello, again Prakash,

Thank you for verifying the call works with basic auth. I went back through the documentation and it does seem that only basic auth is allowed when creating a non-connect app webhook within Jira. I was unable to find any existing feature requests to add this functionality so I have created a new feature request for this. You may find this request at JRACLOUD-71965. I would suggest voting and watching this feature request to receive future updates.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer