Unable to log in to HipChat from Stash

Miscellaneous

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

After the initial integration of Stash and HipChat, a user tries to implement notifications for a Stash 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"

Cause

This is caused by Stash base URL conflict, which indicates the base URL of Stash is different from the URL that was used during the initial Stash/HipChat integration. HipChat integration requires the same base URL to be used at all times.

Resolution

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.

  1. Remove the current HipChat integration.
    1. Go to the HipChat integration global settings page
    2. Click the "Remove Integration" button in the top right (don't worry, all your room mappings will be saved) 
    3. Click "OK" on the HipChat Dialog.
  2. Reestablish the HipChat/Stash 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 Stash 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.

Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.