Hipchat Webhooks global integration

Sergey Temchenko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2015

Hello, i have a question about custom webhooks. According to documentation

Webhooks

Webhooks can be registered by a user or integration to receive a notification of an event. They can currently only be registered against a specific room via the the REST API.

If i get it, it means that i can create global(All rooms) webhooks through API. But when i check that api out, i see

Create webhook

POST/v2/room/{room_id_or_name}/webhook

I must set up room id, otherwise it answers with 400 and asks me to specify it.

Please, can you show me the way in which i can make my integration global?

3 answers

1 vote
Conor
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2015

Global webhooks need to be declared in the capabilities descriptor of your integration. They will be setup by HipChat when the integration is installed. Add one or more webhooks into the "webhook" element of the capabilities descriptor.

 

 

 

1 vote
Tanguy Crusson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2015

Hi Sergey,

If you declare a webhook in your capabilities descriptor, and your add-on is installed globally, the webhook will automatically be installed in every room. For example:

"webhook": {
  "url": "https://addon.example.com/echo",
  "pattern": "^/[eE][cC][hH][oO]",
  "event": "room_message",
  "authentication": "jwt",
  "name": "Echo"
}

You cannot yet register a global webhook by calling the REST API.

Cheers,

Tanguy

 

0 votes
Sergey Temchenko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2015

@Tanguy Crusson, @Conor MacNeill thank you guys! Does it mean that i can't install global webhook without Integraton? I have to provide, at least, http://my-site.com/descriptor.json with format just like you've written before?

Tanguy Crusson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2015

That is correct: you cannot add a webhook just using a token, you have to provide a descriptor. It's all explained here: https://ecosystem.atlassian.net/wiki/display/HIPDEV/Building+an+add-on

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events