How to create an auth token for HipChat with a specific role

For a non-HipChat add-on, I need an auth token to communicate with HipChat via its v2 REST API. I want to have a specific scope for the auth token in order to be able to create rooms (i.e., scope "manage_rooms"). Is there a way to create such an auth token? Can I use the OAuth API for this? In HipChat's web admin interface, I was only able to create tokens with either notification or admin scopes, but none of the new scopes of the v2 API ('manage_rooms', 'admin_room', etc.).

Thanks,

Michael

8 answers

This widget could not be displayed.
David Maye Atlassian Team Jan 16, 2015

Hi Michael,

The v2 tokens are generated at https://www.hipchat.com/account/api under your account in HipChat. API v2 documentation is here. Hope this helps.

Cheers,
-David
Atlassian HipChat Support 

This widget could not be displayed.

Hi David,

Thanks for your answer. But that link only allows be to create a personal token. What I want is to create a token with one of the scopes provided with the V2 API (i.e., "manage_rooms") that can be used for my non-HipChat plug-in. Is there a way that I can request a token via OAuth with the HipChat REST API with a specific scope?

I would like to use a mechanism similar to the OAuth authentication with Atlassian's application links. A HipChat user with the necessary rights could grant my non-HipChat plug-in a token with "manage_rooms" scope.

Cheers,

Michael

Hi Michael, Could you describe the integration with HipChat that would like to implement? Maybe implementing it as a HipChat add-on is an option? I think the /users/authorize endpoint could help in your case (see https://www.hipchat.com/docs/apiv2/auth), but my understanding is that you would still need an add-on in this case. Regards, Patrick

Hi Michael I'm experiencing a similar issue to yours: I can only see on the web UI how to create a personal access token. Have you figured out how to generate a general admin token for the v2 API?

Hi Pieter, Not yet, unfortunately. What I am looking for actually is a way to create tokens manually (via the HipChat admin web GUI) for the specific scopes the HipChat v2 API provides (e.g., for "manage_room" scope). Currently, I only see how this is possible when we would develop a HipChat add-on, but not that it would be possible to let the user create such a token by himself and enter it in our non-HipChat add-on's plug-in settings...

Hello, I'm still unable to create rooms from add-on´s. Token complains with: Must be a valid room owner. Here is my descriptor: 
https://ropacolombiana.es/atlassian-connect.json

Thanks for your help.

This widget could not be displayed.

Hi Patrick,

Thanks for your answer. What we would like to implement is a feature that involves creating a HipChat room for certain kind of discussions and to invite a list of people into this newly created room - all done from a non-HipChat add-on. This requires that we have a token with at least "manage_room" scope in order to create a new room and to get all users of a HipChat group (via /v2/user) to provide auto-completion in our add-on for the list of users to invite into the new room.

With API v1, we could just ask the customer to give us an admin token for our add-on which we would save in the add-on settings. But of course, this might be a show-stopper for our add-on because an admin token is a higher permission we actually would need (speaking in terms of the API v2 where the scope manage_room would be enough). But for API v1 we would even need an admin token to retrieve the users of a group (via users/list).

My idea was to redirect the user of our add-on to a HipChat URL where that user would be able to grant our add-on an auth token with manage_room scope via OAuth, similar to what is possible with Atlassian's application links.

 Is that possible? Do you see another solution?

Regards,

Michael

This widget could not be displayed.

Any update on this issue? I also can only see where I can create a token for my account, but not a general token. 

This widget could not be displayed.

I'm having this similar problem and I'm unable to create a token for specific roles. Can someone at Atlassian provide a guide on how to do this? 

 

Thanks

This widget could not be displayed.

Hello,

 

Is there any updates on this topic?

What is the way of requesting API token via some kind of request?

 

Thanks

This widget could not be displayed.

Hello All,

Is the update on this issue ? I'm experiencing the same problem.

Regards

This widget could not be displayed.

I think HipChat ceased operation. They don't update this product anymore. Time to switch to Slack.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 10, 2018 in Hipchat

What should I think about when migrating HipChat to Slack?

...from the beginning. We have built up a lot of content in HipChat, with it being a core tool in our distributed company model. While it is true that we didn’t need to move to Slack immediately, we felt it...

402 views 1 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you