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

How to poll HipChat chat history with JavaScript?

Bastian Kippelt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2016

I'm building a HipChat API with JavaScript which I need for a separate HipChat WebClient. I do not want to include HipChat by iframe.

Do anyone know which is the best way to poll the chat history with javascript?

Something like that only better...

setInterval(function() {
	getHistory()
}, 1000);
 
function getHistory() {
	// load chat history by XMLHttpRequest (REST)
}

1 answer

0 votes
Anatoli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2016

Hi Bastian,

The REST API for retrieving history is described here. In general we don't have public APIs for writing clients, we do have APIs to integrate with HipChat - you can potentially use them for some of the functionality but other, like listening to direct messages, would not be available.

You can try to reverse engineer HC clients but be aware that the communication calls between Client and server are not considered public APIs and are subject to change.

 

Why are you trying to develop a separate client? what's your usecase? Maybe we can help with ideas...

Bastian Kippelt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2016

We want to integrate HipChat in our Scroll Viewport Website as a support chat for anonymous users. For every support case, a new room is created and the anonymous user is invited. Also a support staff is invited to the support room. The chat window should be kept very minimal. And that does not work with the iframe integration. Or?

Bastian Kippelt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2016

Maybe it is possible to hide the sidebars (roster, files, ...) by default? 

Anatoli
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 8, 2016

Right, you are doing something similar to what smooch have done (they have done it in mobile). Yes, you can do it as an add-on and develop a very simple web chat UI that would communicate to your add-on and receive/send the messages. The add-on itself sits in the middle and routs the messages to the right room or webchat UI.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events