Skip to content

bradennapier/intercomly

Repository files navigation

intercomly

A Typescript API for Intercom API v2.0 - Unfinished

import IntercomlyClient from 'intercomly';

const client = new IntercomlyClient({
  token: process.env.INTERCOM_TOKEN,
});
for await (const contacts of client.getContactsByEmailPaginated('test@example.com')) {
  // paginated results
}
// or raw result
await client.getContactsByEmail(email)

// or by external_id
await client.getContactByExternalId(externalId);

// or by intercom internal id and provide custom attributes shape expected
await client.getContact<{ customAttribute: string }>(contactId);
await client.upsertContactByExternalId({
  role: 'user',
  external_id: 'unique_id',
});
await client.upsertTag('Tag Name')

About

Typescript & Node Intercom v2.0 API Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published