XMPP based hipchat bot? Where to get auth?

Every github repo I find mentions bots having their own jid/password, where do I get those things? I created an integration and all I can see is the "message posting URL" and "slash commands", where do I get the auth details needed to log in with the bot to the actual chat?

Is it even possible to offer an app on the marketplace that uses XMPP and listens to chat messages?

1 answer

1 accepted

0 vote

For XMPP bots, the various information required to connect can be found by going to https://hipchat.com/account/xmpp. Unfortunately, XMPP bots aren't something that can be placed on the marketplace / developed as an "official" integration due to the way they interact with the service. In the future we hope to add a more fleshed out "bot" framework that allows what you describe.

Marketplace addons can listen to messages (slash commands are one example like you mentioned, but you can listen for any message, just like a bot could) and send responses using the webhook API: https://www.hipchat.com/docs/apiv2/webhooks. It might be that webhooks could suffice for what you're looking to do (you just wouldn't have an actual user show up that people could 1-1 chat with).

I see, I'm guessing that currently listening to every message involve polling room history API or is there a real-time alternative?

With webhooks, the server will actually listen to all messages for you, so if you're looking to respond to message text, that might be an avenue that works. If you're looking to receive all messages, you might be able to have a "*" webhook and parse each message individually (I'm not sure if this is supported however... it might require a more restrictive regex). 

Polling the room history API is also an alternative, but not recommended (you'd probably hit the API rate limit cap pretty quickly unless you were only polling a single room)

Oh I see, I somehow never found that incoming webhooks page with the regex patterns, yeah, that should be enough to get me going. Thanks!

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...

462 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