There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Refresh the chat widget

Last updated June 17, 2020


Refresh and re-render the widget's information, given the current page url.

If you house the chat widget on a single-page application, this method can be useful to refresh the widget on route changes. This allows you to specify different chatflows on different page routes. If widget.refresh is called on a route where there is no chatflow, the widget will be removed.

  • widget.refresh will preserve any existing conversations that a page visitor has started in the widget.
  • widget.refresh is throttled to one call per second.