I am trying to create a webhook with the REST api with a Connect App. My app has the admin
scope. I am sending a post request to baseUrl/rest/webhooks/1.0/webhook
with the following payload structure:
{
"name": "Integration",
"url": "https://myurl/api/webhook/",
"events": [
"jira:issue_updated"
],
"filters": {
"issue-related-events-section": "Project = JRA AND resolution = Fixed"
},
"excludeBody" : False
}
Each time I send a request I get a 403 - Forbidden
. I can access the /rest/api/2/
endpoint with the sharedSecret
using jwt
authentication
I am not sure why that particular request is failing (I have not used the api’s under rest/ ... / 1.0
)
Perhaps you could try using the webhooks rest api 2.0 version, which appears to be very similar: documented here: https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-webhook-post
I just tried out your payload and found a little problem. Value of “excludeBody” key is False, which should be “false”.
I tried out this payload which works:
{
"name": "Integration",
"url": "https://myurl/api/webhook/",
"events": [
"jira:issue_updated"
],
"filters": {
"issue-related-events-section": "Project = JRA AND resolution = Fixed"
},
"excludeBody" : "false"
}
Please try this out and let us know if it still doesn’t work.