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
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:
You will then see something that looks like this:
Use 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.