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

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

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

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
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,225 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