I am requesting a token using the XMPP API for HipChat according to this page: https://docs.atlassian.com/hipchat.xmpp/latest/xmpp/auth.html. I am trying to use this token in a curl request, like this:
$ curl "myserver.net/v2/room?auth_token=QygMot5ByF41YzW&auth_test=true"
But I get the following error:
{ "error": { "code": 401, "message": "Invalid OAuth session", "type": "Unauthorized" }
Should I be able to use the OAuth2 token from the XMPP API with the REST v2 API, or am I trying to do something which is not supported?
My end goal is to have my XMPP client be able to upload files to the HipChat server - should I do this in some other way?
Thanks.
I found the answer myself. The token received via the XMPP function mentioned is not an OAuth2 token. In an old wiki page, a different method for obtaining an OAuth2 token is mentioned: https://ecosystem.atlassian.net/wiki/display/HCDEV/HipChat+XMPP+Protocol+Documentation#HipChatXMPPProtocolDocumentation-Aquickauthmethod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.