1.0.3 • Published 1 year ago

@homebaseai/intercom-api v1.0.3

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
1 year ago

homebaseai/intercom-api

This is plain JavaScript API for Intercom. It is utilized by the other vue packages in this repository.

Installation

npm i @homebaseai/intercom-api

Usage

import * as intercom from '@homebaseai/intercom-api';

// Install intercom will attach intercom to the window
// and create the script tags on the document.
intercom.installIntercom({ app_id: 'intercom_id' });

// first boot it.
intercom.boot({
  app_id: import.meta.env.VITE_APP_INTERCOM_TOKEN,
  user_id: 1,
  name: 'John Doe',
  email: 'john@exampl.com',
});

// then do whatever...
intercom.show();

API Methods

All of the methods covered here, are supported.