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

How can I get the token having scope of view_message using api?

 

2 answers

0 votes
crivers Atlassian Team Mar 03, 2017

If you go to https://hipchat.com/account/api, you should arrive at a page that lets you generate API tokens with whatever scopes you have access to

Hi Christopher,

I know if I can go to profile and generate token manually then this is possible. But how should I do it using api call / programmatically. Let me know if you know about this, that would be really helpful

crivers Atlassian Team Mar 03, 2017

Ahh - the scope of your addon is actually defined at install time. You can see an example in the addon descriptor on https://developer.atlassian.com/hipchat/guide (under hipchatApiConsumer > scopes). If you're using a provided library, creating tokens and making API requests is one of the methods provided in the framework. For the node example, you can check out https://developer.atlassian.com/hipchat/tutorials/getting-started-with-atlassian-connect-express-node-js#Gettingstartedwithatlassian-connect-express(Node.js)-CallingtheHipChatRESTAPI but any of the libraries should have a similar method available.

But I am using HipChat as a SaaS, then also do I have to do the descriptor thing. I am pretty new in implementing api's. I am not installing HipChat, just using it as a service.

crivers Atlassian Team Mar 08, 2017

Indeed - if you're looking to make an integration that can be installed for your HipChat group you would need to define a descriptor with the appropriate permissions. If this is the first time you're setting up an integration, I would highly recommend going through the step-by-step tutorial at https://developer.atlassian.com/hipchat/tutorials/getting-started-with-atlassian-connect-express-node-js - it will help walk you through all the steps in building an integration.

Alternatively, if you just want to call the API (to send a notification for example), you can go to hipchat.com/account/api and generate an API token that can be used from any external script.

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