Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

XMPP based hipchat bot? Where to get auth?

Eli March 3, 2017

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
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 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).

Eli March 3, 2017

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
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 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)

Eli March 3, 2017

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
AUG Leaders

Atlassian Community Events