It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 votes
Answer accepted
crivers Atlassian Team Mar 03, 2017

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?

crivers Atlassian Team Mar 03, 2017

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 Sign up to answer
TAGS
Community showcase
Published in Hipchat

Hipchat Cloud and Stride have reached End of Life (updated)

All good things come to an end - thanks to all our customers and partners who have been along the Hipchat and Stride journey with us.  As of Feb 15th 2019, Hipchat Cloud and Stride have reached ...

35,536 views 9 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you