This is a fork of the [intercom]( library which is no longer maintained.

# Intercom

An Elixir library for working with [Intercom]( using the [Intercom API](

## Installation

Add `intercom` to your list of dependencies in `mix.exs`:

def deps do
    {:intercom, "~> 2.0", hex: :intercom_elixir}

## Configuration

To get started you'll need to add your [access_token]( to your `config.exs` file. You can also change the http_adapter used to make requests. This library uses `HTTPoison` by default.

See [How to get your Access Token](

**Keep your access token secret. It provides access to your private Intercom data and should be treated like a password.**

config :intercom,
  access_token: "access_token_here..."
  http_adapter: HTTPoison

## Usage

The [full documentation]( is published to hexdocs.

This library provides functions for easy access to API endpoints. For example, [User]( endpoints can be accessed like this:

# Get a user
{:ok, user} = Intercom.Users.get("a1b2")

# List users by `tag_id`
{:ok, %{"users" => users}} = Intercom.Users.list_by(tag_id: "a1b2")

# Insert or update a user
{:ok, upserted_user} = Intercom.Users.upsert(%{id: "a1b2", name: "Steve Buscemi"})

If there are endpoints in the API that aren't currently supported by this library, you can access them manually like this:

{:ok, data} = Intercom.API.call_endpoint(:post, "new_endpoint/a1b2", %{body_data: "here"})

## Resources

- [Intercom Developer Hub](
- [API Guide](
- [API Reference](
- [SDKs and Plugins](