Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

intercom-client

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intercom-client

Official Node bindings to the Intercom API

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
151K
increased by4.68%
Maintainers
1
Weekly downloads
 
Created

What is intercom-client?

The intercom-client npm package is a Node.js client for the Intercom API. It allows developers to interact with Intercom's services programmatically, enabling functionalities such as managing users, sending messages, and handling conversations.

What are intercom-client's main functionalities?

Managing Users

This feature allows you to create and manage users in your Intercom account. The code sample demonstrates how to create a new user with an email and name.

const Intercom = require('intercom-client');
const client = new Intercom.Client({ token: 'your_access_token' });

client.users.create({
  email: 'test@example.com',
  name: 'Test User'
}).then(response => {
  console.log(response.body);
}).catch(error => {
  console.error(error);
});

Sending Messages

This feature allows you to send messages to users. The code sample demonstrates how to send an in-app message from an admin to a user.

const Intercom = require('intercom-client');
const client = new Intercom.Client({ token: 'your_access_token' });

client.messages.create({
  message_type: 'inapp',
  body: 'Hello, this is a test message!',
  from: {
    type: 'admin',
    id: 'admin_id'
  },
  to: {
    type: 'user',
    id: 'user_id'
  }
}).then(response => {
  console.log(response.body);
}).catch(error => {
  console.error(error);
});

Handling Conversations

This feature allows you to list and manage conversations. The code sample demonstrates how to list all conversations for a specific admin.

const Intercom = require('intercom-client');
const client = new Intercom.Client({ token: 'your_access_token' });

client.conversations.list({
  type: 'admin',
  admin_id: 'admin_id'
}).then(response => {
  console.log(response.body);
}).catch(error => {
  console.error(error);
});

Other packages similar to intercom-client

Keywords

FAQs

Package last updated on 12 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc