If you are unfamiliar with HipChat, its a persistent chat room used for team collaboration. With its abundance of features, one that stands out is the ability to utilize the HipChat API to send notifications messages to your team rooms. Notifications are great for letting everyone on your team know an event of significance has occurred. Examples include commits to your source code repository, continuous integration results, or when an extremely angry user adds a new issue to the bug tracker.
While many web based services offer hooks to make sending notification message to HipChat easy (such as Github), what if you want to send a notification from an existing Bash script that you use everyday? Well you’re in luck, because the HipChat API makes this extremely easy to do using cURL!
NOTE: If you haven’t generated a HipChat API Token yet, learn to do so here.
1 2 3 4 5
NOTE: Make sure to change the parameters to fit your application and insert your authentication token!
HipChat API notification messages have some neat features, such as colors and notify. This makes it easy making it easy to instantly indicate to your team via HipChat if something erroneous has occurred (such as failed unit tests).
Be sure to check out the full HipChat API documentation for sending messages to rooms.