Hipchat API V2 "get all rooms" call doesn't show private rooms to Admin

Hi,

I have created some test accounts/rooms/messages on a test HipChat server.

Most things work as expected.  However, I ran into a problem getting a list of all rooms as an admin.

  • RegularUserA creates a private room and invites RegularUserB. 
  • They can correctly chat with each other.
  • They can correctly use the V2 api to get a list of rooms and room history.
  • AdminUser1 can correctly use the "room history" call to access the private room (if he somehow knows the room id).
  • AdminUser1 incorrectly(?) does not see the private room when using the "get all rooms" call.

the calls I am using look like this:

http://hipchat.localdomain/v2/room/4/history?end-date=2015-12-16&date=2016-01-08&auth_token=<Admin_ViewGroupToken>
http://hipchat.localdomain/v2/room?start-index=0&max-results=100&include-private=true&auth_token=<Admin_ViewGroupToken>

As an Admin using the V2 API how should I get a list of rooms that include private rooms created by regular users?

 

Thanks

1 answer

4 votes

Hi,

You can access private rooms created by regular users if you use an addon token (if addon is global and has scopes view_group) instead of a personal token.

You can find more info about addon in the documentation: https://www.hipchat.com/docs/apiv2

And here's a link to a sample addon https://bitbucket.org/pstreule/hipchat-echo-addon 

Thanks I will give that a try.

However, do you find it odd that the personal admin token can actually see the private room history? It just can't get a list of the room numbers. Since the room numbers appear to be simple identity that increments by one I suppose I could just get a list of all rooms including archived rooms and then the missing numbers would be the private rooms.

After struggling with Certs I was finally able to get the sample add-on working and verify that it can indeed get a list of private rooms.

 

Thanks.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Mar 26, 2018 in Hipchat Data Center

Migration of Hipchat server to Data Center - a retrospective

...able to use the clients After a bunch of testing (rooms, memberships, check for private message history, and most importantly - the custom emoticons!) nearly everything was looking as we needed, however...

453 views 2 6
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