It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Invalid OAuth session getting Hipchat users list with new admin token

Hi,

 

We use Hipchat server, version 2.2.9, and we use 

https://hipchat-company.com/v2/user?auth_token=TOKEN&start-index=0&max-results=1000

to get the user list daily, but some days ago it stopped working (the same day, in Test and Prod environments). 

First idea has been to refresh tokens with new ones, creating it using option

https://hipchat-company.com/admin/api

We have created Admin and Notification tokens (in their respective instances), but in both cases the error still is:

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

 

 

What am I missing?

Thank you in advance

1 answer

0 votes
AhmadDanial Atlassian Team Jul 22, 2018

Hi there, Rafael.

Firstly, I suspect that you ran into the issue possibly due to the expiry of token since you mentioned that it stopped working. 

Next, the new token that you generated is referring to the API v1 token with reference to the URL you provided. In this case, I suggest you to generate a new API v2 token instead through https://<url>/account/api .

Please ensure that you have the right scope (with reference to the documentation here, you need to have the View Group scope). For example:

Screen Shot 2018-07-23 at 06.37.47.png

You will then see something that looks like this:

Screen Shot 2018-07-23 at 06.38.01.pngUse the new generated token and let me know if you are still running into any issues along the way.

Hi,

Yes! Verified it was the expired token.

But to generate the new one, to see those 'Scopes' Group Admin -> Api option cannot be used but Account Settings (from an admin user) -> API access options.

Then, the token can be created usign 'View Group' scope and it works.

 

Thank you

AhmadDanial Atlassian Team Jul 23, 2018

Hi, Rafael.

Oh, yes! Thank you for highlighting that one out specifically since it has to be a personal API v2 token rather than an API v1 token. 

Nevertheless, you are most welcome. Happy to know that it helps!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Hipchat

Hipchat Cloud and Stride have reached End of Life (updated)

All good things come to an end - thanks to all our customers and partners who have been along the Hipchat and Stride journey with us.  As of Feb 15th 2019, Hipchat Cloud and Stride have reached ...

35,235 views 9 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you