Possibility to open the chat window by using custom button/js

So I found an undocumented API:

window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen()

This triggers the chat window to open, which might be useful to some of you.

That is the only piece of the ‘experimental API’ that exists. There is no way to close the window and there are no callbacks to notify you if the chat window is opened, closed, resized etc. or to toggle targeted messages. I had to implement a resize observer to achieve those.