How can I use the hipchat API to setup a slash command

Consider the use case where I want to spin up a HipChat room to address a specific issue.  I can use the HipChat API to do so in an automated fashion.  As part of setting up that room, I want to give the users some capabilities, like /DoThis or /DoThat where the slash command posts to a given endpoint and takes responses back from it..  I could make those general features for all of HipChat (added as integrations to ANY room), but that has drawbacks.

Is there an API I can use with cURL (or otherwise) to add dynamically add a slash command to a room?


5 answers

1 vote
Nick Turskyi Atlassian Team Feb 28, 2017

Hi Kirk,

Sounds like an integration/addon is the right way to achieve that.

In order to perform actions in response to slash commands (any pattern in the user's message actually), you would use webhooks:

Here is the comprehensive guide on how to start developing your integration with Atlassian Connect Express: - it even includes the sample slash command "/hello"!





That was interesting.

can you share some sample script , where your slash command worked. I would like to test slash command in HipChat



0 vote
Nick Turskyi Atlassian Team Mar 09, 2017

Hi Vijaya,

Make sure to check out this blog post as well - it has a nice walkthrough on setting up a simple slash command:



Thanks Nick.

I Was actually looking for some scripts like when we post  to that URL , whats the script behind that code . Any working example i was looking for.


0 vote
Nick Turskyi Atlassian Team Mar 10, 2017

See my original answer - Atlassian Connect Express example works out of the box and implements the "/hello" slash command.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Published Oct 07, 2017 in Hipchat

Bringing Structure to your HipChat Instance

...have mention name FirstnameLastname. Fe.: @MaartenCautreels This certainly helps to know who is being mentioned in a conversation. Imagine your colleague sends the following message...

467 views 1 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot