Hipchat integration not working

Problem:

Hipchat integration is setup but event notifications are not generated.

Solution:

You can test your hipchat integration simply by using this curl command :


curl -H "Content-Type: application/json" -X POST -d '{"color":"red","message":"some test message"}' https://SUBDOMAIN.hipchat.com/v2/room/ROOM-ID/notification?auth_token=API-TOKEN -k

 

Replace: 

- SUBDOMAIN with your hipchat server subdomain 

- ROOM-ID with Hipchat room ID

- API-TOKEN with your Hipchat API Token

 

This command should send a test message to your Hipchat server and posting of this message will indicate a successful Hipchat integration, but if you are getting an unauthorized massaged back as shown below:

{
"error": {
"code": 401,
"message": "Invalid OAuth session",
"type": "Unauthorized"
}
}

Then this indicates that the API key that you are using is incorrect. A correct API key should look something likes this: X99UauK5CqhOCsZZZTaNb9fMuFY9pFUMpZKttWyD

Please follow these steps closely in order to create the right Hipchat API key, if you have Hipchat admin access:
1) In your Hipchat administrator view, click on My Account -> People
2) In this list of users, choose the one that should be used by Instana to post messages to your channel (It can be any user and the user does not need to be logged in)
3) In the upcoming view, click on Edit Profile -> API Access
4) Create a new token with the scope: Send Notification

If you don't have Hipchat admin access, there is an alternative way to generate API keys on a per-room basis:

1. Click the room options at the top right of the channel
2. Pick the option for Integrations
3. Install new BYO (build your own)
4. Provide a fancy name and click save to get an API auth_token specific to the channel

After you have created the correct API key, replace the existing with the correct one. It then will take a few minutes to refresh caches. This should fix the problem.

 

Have more questions? Submit a request

Comments