Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I use the OAuth2 token from the XMPP API with the v2 REST API?

Jonatan Pålsson September 30, 2016

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.

1 answer

1 accepted

0 votes
Answer accepted
Jonatan Pålsson October 1, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events