Does confluence Cloud supports Webhooks?
Asked by kuldeep kushwaha:

I have created confluence access token using the below-mentioned link,  
<https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/>

As per Atlassian Webhook Docs mentioned below  
<https://developer.atlassian.com/cloud/confluence/modules/webhook/>

Confluence supports webhooks but URL to create webhook is not mentioned properly in the documentation.  
Can you please help me with Url and parameters.


Answers:
author: Dario B
body: Hello [@kuldeep kushwaha](/t5/user/viewprofilepage/user-id/2143186) ,

Allow me to step in and try to summarize everything that has been said till now.

However, before going any further, I'd like to also try to make clear that **this is not the best place to ask development related questions** . The right resources are listed in [https://developer.atlassian.com/resources](https://developer.atlassian.com/resources "https://developer.atlassian.com/resources"):

* [Ask the Developers Community](https://community.developer.atlassian.com/ "https://community.developer.atlassian.com/")
* [Create a Developer Support Request](https://ecosystem.atlassian.net/servicedesk/customer/portal/14 "https://ecosystem.atlassian.net/servicedesk/customer/portal/14")

Once this has been said:

1. In [Confluence Cloud Webhooks](https://developer.atlassian.com/cloud/confluence/modules/webhook/) can only be registered through the descriptor file of an add-on, not from the UI  

2. There is an open feature request to ask for the possibility to manage Webhooks through the UI: [\[CONFCLOUD-36613\] *Allow Confluence Webhook Administration*](https://jira.atlassian.com/browse/CONFCLOUD-36613)  

3. The frameworks to create an add-on for Confluence Cloud, including nodejs, are listed in this page: [Frameworks and Tools](https://developer.atlassian.com/cloud/confluence/frameworks-and-tools/)  

4. Having the right skillset it should be quite easy to build a simple add-on that will just register some Webhooks that will send data to the desired endpoint in WebMethods in case of any update in Confluence Cloud.  
5. Once registered, Webhooks should be triggered almost immediately when the desired/configured events were fired. I am not sure what you mean with "instant updates". Can you provide more details on this?  
6. If you need further help with this you may want to ask in the developers community rather than in here: <https://community.developer.atlassian.com/>

I hope this clarifies.

Cheers,  
Dario

comments: author: webmethods-integration
body: HI [@Dario B](/t5/user/viewprofilepage/user-id/502402) [@Shannon S](/t5/user/viewprofilepage/user-id/510046)   

Using the app descriptor file I am able to register webhook in Confluence Cloud and able to receive the JSON data as soon as an event is performed in Confluence.  
But I noticed that the user who is within the administrator group was able to set webhook and other users were not.  
I searched for the same but didn't find anything on Confluence Documentation.  
So is there any restrictions with scopes regarding Webhook setup. If yes can you please provide me with the document link.

Regards,

Kuldeep Kushwaha


author: Dario B
body: Hello [@webmethods-integration](/t5/user/viewprofilepage/user-id/3192373) ,

It is pretty normal that only admin can create webhooks and this is actually the same in Jira. Indeed, the page to create webhooks is in the Jira administration section (not accessible to non-admin users).

If it wouldn't be this way, a malicious user would be able to create webhooks to send sensitive/private data to remote resources.

Also, for the future, please try to avoid adding questions to threads that are already 7 months old. Create a new thread instead.

Have a nice weekend.

Cheers,  
Dario


author: Earl McCutcheon
body: Hi All,

[@Dario B](/t5/user/viewprofilepage/user-id/502402) just added a new workaround to the [CONFCLOUD-36613](https://jira.atlassian.com/browse/CONFCLOUD-36613) feature request that I am reposting below to make sure it gets extra visibility, hope this helps y'all out:

Workaround {#toc-hId--440185361}
--------------------------------

**WARNING!**  
There is one security concern regarding webhooks created using the way explained below: even though they can only be created by admins, there are no other permissions checks. If a regular user creates a restricted page, admins won't be able to access it via Confluence UI/API, but they will be able to receive webhooks related to this page. The information of course is very limited, but they will be able to see a title of a page, for example. We fixed this for regular webhooks a couple of years ago, but here it's not possible since there is no user to check permissions against.

There exists a private API that can be used for this purpose. However, **the endpoint discussed below is intended for internal use only** . Therefore, it is not part of the official [Confluence Cloud REST APIs,](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) **it is not supported and it can change without any notice**.

Once this has been said: you can register, list or delete Webhooks in Confluence Cloud by using the internal REST API endpoint /wiki/rest/webhooks/1.0/webhook.

The endpoint works the same way as the /rest/webhooks/1.0/webhook endpoint documented for Jira Cloud in the [Webhook documentation page, section: Registering a webhook using the Jira REST API (Other integrations)](https://developer.atlassian.com/cloud/jira/platform/webhooks/#registering-a-webhook-using-the-jira-rest-api--other-integrations-)

**To register a webhook using REST:**

1. Send a POST request using below format to: <https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook>  

   ```
   {  "name": "Webhook (test comment created)",  "url": "https://www.example.com/webhooks",  "events": [    "comment_created"  ]} 
   ```

<!-- -->

1. The response will return the webhook in JSON with additional information, including the user that created the webhook, the created timestamp, etc.

For a complete list of events, etc, please refer to the [Confluence Cloud Webhook documentation page](https://developer.atlassian.com/cloud/confluence/modules/webhook/).

**To unregister (that is, delete) a webhook using REST:**

* Execute a DELETE to the following URL: [https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook/\<Webhook-ID\>](https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook/)

Example:  
The following would delete the webhook with an ID of 70:  

```
curl --user EmailAddress:ApiToken -X DELETE -H "Content-Type: application/json" https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook/70
```

**To query a webhook using REST:**

* To get all webhooks (registered using this method) for a Confluence Cloud site, send a GET request to: <https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook>.

Example:  

```
curl --user EmailAddress:ApiToken -X GET -H "Content-Type: application/json" https://your-domain.atlassian.net/rest/webhooks/1.0/webhook
```

* To get a specific webhook by its ID, perform a GET with the following URL: [https://your-domain.atlassian.net/rest/webhooks/1.0/webhook/\<Webhook-ID\>](https://your-domain.atlassian.net/rest/webhooks/1.0/webhook/)

Example: the following would get a webhook with an ID of 72  

```
curl --user EmailAddress:ApiToken -X GET -H "Content-Type: application/json" https://your-domain.atlassian.net/rest/webhooks/1.0/webhook/72
```


author: Shannon S
body: Hello [@kuldeep kushwaha](/t5/user/viewprofilepage/user-id/2143186),

Confluence Cloud does have Webhooks, as you have already discovered. However, Confluence does not have a Webhook administration page as in Jira. We have the below feature request for this:

* [CONFCLOUD-36613](https://jira.atlassian.com/browse/CONFCLOUD-36613) *Allow Confluence Webhook Administration*

Webhooks can be registered through the descriptor file in Confluence Cloud as mentioned on this thread from our Developer Community, [Are webhooks available to add-ons in Confluence Server](https://community.developer.atlassian.com/t/are-webhooks-available-to-add-ons-in-confluence-server/7190/3).

In case you have any further questions about this, I advise you to raise a question on the Developer Community that I linked above. Be advised that the regular Atlassian Community is focused on end-users, so you're more likely to find the help you need from the Developer Community.

Regards,

Shannon

comments: author: kuldeep kushwaha
body: Hi,  
Can we create Confluence plugin using node js if so can you please provide me with the link.

And can Confluence plugins act as webhooks and provide me with the latest update.

Regards   
Kuldeep Kushwaha


author: Shannon S
body: Kuldeep,

Yes, you can! Here's the documentation below:

* [Getting Started on Confluence Cloud development](https://developer.atlassian.com/cloud/confluence/getting-started/)

If you have any questions regarding this, please reach out to the [Developer Community](https://developer.atlassian.com/resources) instead; they will be able to answer any questions for you related to developing for Atlassian products.

Regards,

Shannon


author: kuldeep kushwaha
body: Hi,

<br />

I want to integrate confluence with our product webMethods.io Integration in the same was as slack is integrated with confluence.  
Any changes made in confluence is notified to me on our notification url can we achieve this through macro.

<br />

I asked the same query on the Atlassian community.  
<https://community.atlassian.com/t5/Confluence-questions/Want-to-create-addon-integrate-webMethods-io-to-receive/qaq-p/1237238>

The above link provided by you explains how to create macros but can I achieve instant notification updates by using macros.

<br />

Could you please help me with this.

Regards  
Kuldeep Kushwaha


author: Shannon S
body: Hi Kuldeep,

Thank you for the explanation. I'm not familiar with creating add-ons, so I don't have any information on that, unfortunately.

You'll want to raise this question on the [Developer Community](https://developer.atlassian.com/resources?_ga=2.219851033.188572898.1574628872-1642555208.1571221417) that I let you know about. The folks there are more familiar with add-on and macro development for Confluence, and they'll be able to give you advice.

Regards,

Shannon


author: kuldeep kushwaha
body: Hi,

Can you just give me the rough estimate, by what time Confluence cloud will support webhooks for instant updates?

Regards  
Kuldeep Kushwaha


author: Shannon S
body: Hello Kuldeep,

Can you elaborate on what you mean by instant updates? I confirmed earlier that webhooks *are*supported in Confluence. Administration of webhooks is not supported, and that's the feature request I sent you.

At this point, it's a feature request, so there is no estimate as to when or if this will be implemented. You can see our [Implementation of New Features Policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) for details on how we choose to implement new features.

If, at some point in the future, a feature is chosen to be implemented, updates will be included on the feature request ticket. You can watch a ticket in order to be included on those updates.

Regards,

Shannon


author: kuldeep kushwaha
body: Hi,

By Instant Updates I mean provide me with JSON Data as soon as some event Is Performed in Confluence Pages or Spaces.

But as u said Webhooks are available under descriptor file in Confluence Cloud  
Can you just help me with where can I find the Descriptor file?

Regards

Kuldeep Kushwaha


author: Dario B
body: Hi [@kuldeep kushwaha](/t5/user/viewprofilepage/user-id/2143186) ,

I believe you are mixing 2 things that have nothing to do with each other. However, to make sure we are all on the same page:

* ++"Webhooks for instant updates" are already available++ in Confluence Cloud: once configured they send the JSON data as soon as an event is performed in Confluence  

* The fact that you do not have a page to configure the webhooks it does not mean they are not available.  

* You can find all the information you need about the [app descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/) file in: <https://developer.atlassian.com/cloud/confluence/app-descriptor/>  

* This is not the place to get help on add-on development related questions. Please go to the [developers community](https://community.developer.atlassian.com/) and ask "how to add webhooks to Confluence Cloud by using the descriptor file" in there: <https://community.developer.atlassian.com/>

Finally, ++in the below page is explained how to build an add-on that++ , among the other things, ++listens and responds via a Webhook when a new page is created in Confluence++:

* [Confluence Cloud apps with Spring Boot and Atlassian Connect (Part 1)](https://blog.seibert-media.com/2018/02/26/confluence-cloud-apps-spring-boot-atlassian-connect-part-1/)

Please notice that I am providing this just as an example. The above page is not part of our official documentation, is not supported by us and it might be outdated.

I hope this clarifies.

Cheers,  
Dario


author: Vadim Rutkevich
body: Hi [@kuldeep kushwaha](/t5/user/viewprofilepage/user-id/2143186) !

You can try to use [Webhook Manager for Confluence Cloud](https://cutt.ly/2oD84xB). It provides an easy way to manage and administer Confluence webhooks.

Thanks.

Sincerely, Vadim \[StiltSoft\]


Tags: api

cloud

confluence-cloud

confluence-development

webhook