日本語コミュニティーへようこそ!コミュニティーを使い始めるには

をご覧ください

Opening live chat via javascript

解決
常連投稿者

We're trying to make it so a button can open the live chat widget via javascript, how could we do this?

(by live chat, I am referring to the hubspot live chat widget)

返信
0 いいね!
承認済みベストアンサー

受理された解決策
進行役

Hi, @Chris_Cardone.

Your request seems similar to this topic. If you use JavaScript to append #hs-chat-open to the end of the URL, the chat widget will open immediately.

Check out the documentation here .

This feature was implemented due to feedback on this HubSpot Community request . The thread includes some helpful code examples from other developers.

Isaac Takushi

HubSpot Developer Support
返信
0 いいね!
進行役

hi @chriscardone and @tjoyce , we also just released a Conversations Live Chat Widget API, where you can use this this function to open the widget:

 

window.HubSpotConversations.widget.open();  

 

4件の返信4
進行役

Hi, @Chris_Cardone.

Your request seems similar to this topic. If you use JavaScript to append #hs-chat-open to the end of the URL, the chat widget will open immediately.

Check out the documentation here .

This feature was implemented due to feedback on this HubSpot Community request . The thread includes some helpful code examples from other developers.

Isaac Takushi

HubSpot Developer Support
返信
0 いいね!
Top Advisor | Gold Partner

You could also do -

hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen()

---

tim@belch.io

返信
0 いいね!
進行役

hi @chriscardone and @tjoyce , we also just released a Conversations Live Chat Widget API, where you can use this this function to open the widget:

 

window.HubSpotConversations.widget.open();  

 

Highlighted
ユーザー

Hello,

 

We succeed using this javascript call:

 

// Open chat
HubSpotConversations.widget.open()

// Close chat
HubSpotConversations.widget.close()

Best regards,

返信
0 いいね!