Unable to log in to HipChat from Bitbucket Server
After the initial integration of Bitbucket Server and HipChat, a user tries to implement notifications for a Bitbucket Server repo but receives an error. This error can occur in two places:
- On the repository settings integration screen.
- An error when you try to "Log in" to HipChat "Unable to generate an authorization code: Error sending request: 400"
This is caused by Bitbucket Server base URL conflict, which indicates the base URL of Bitbucket Server is different from the URL that was used during the initial Bitbucket Server/HipChat integration. HipChat integration requires the same base URL to be used at all times.
I've changed my base URL
If you have changed your base URL since you connected the HipChat integration you need to remove the current HipChat integration, then resync the addon with the new base URL.
- Remove the current HipChat integration.
- Go to the HipChat integration global settings page
- Click the "Remove Integration" button in the top right (don't worry, all your room mappings will be saved)
- Click "OK" on the HipChat Dialog.
- Reestablish the HipChat/Bitbucket Server integration using the instructions found in the article Hipchat notifications.
I haven't changed my base URL
Your problems are mostly likely caused by people using different base URLs, By going to https://www.hipchat.com/admin/addons and finding the integration in the list you can see the hostname that was used when Bitbucket Server was connected in the name of the integration.
If it's on the wrong base URL you will need to follow the steps above to get it back on the right base URL, if its on the correct base URL you should check with your users that they are using the same base URL.