Create webhook using oauth app 2.0 token doesnt work

Ohad Hoffmann
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 16, 2024

Hey, I'm trying to create a webhook using rest API call with an oauth app 2.0 token
the app token can get accessible resources , projects, issues and more - but when trying to create a webhook (scope permission is given) I can 401 response

 

this is my curl -


curl --location 'https://api.atlassian.com/ex/jira/<cloud_id>/rest/api/2/webhook/2' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data ' {
"webhooks": [
{
"events": [
"jira:issue_created",
"jira:issue_updated",
"jira:issue_deleted",
"comment_created",
"comment_updated",
"comment_deleted"
],
"jqlFilter": "issueKey != NONEXISTENTPROJECT-1"
}]
}'
I also tried this guide I found -
https://www.merge.dev/blog/guide-to-webhooks-with-examples-from-jira
after doing all of it, I managed to create a webhook and get 201 - but no webhook was found in the UI section - https://my-test.atlassian.net/plugins/servlet/webhooks#

not sure what else I can check
appreciate your help


0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events