ExIntercom
Elixir library for the Intercom API
Currently has very limited functionality with read-only access.
Roadmap
- Fetch conversations / conversation
- Fetch user
- OAuth
- Fetch admins
- Fetch companies
- Fetch segments
- Fetch leads
- Fetch notes
Documentation
Installation
-
Add exintercom to your list of dependencies in
mix.exs:
def deps do
[{:exintercom, "~> 0.1.0"}]
endEnsure exintercom is started before your application:
def application do [applications: [:exintercom]] endAdd Intercom credentials to
config.exs:config :exintercom, app_id: "...", app_key: "..." client_id: "..." # Optional, for OAuth only client_secret: "..." # Optional, for OAuth only
If no config set, env variables will be used instead with the following names:
app_id -> INTERCOM_APP_ID
app_key -> INTERCOM_APP_KEY
client_id -> INTERCOM_CLIENT_ID
client_secret -> INTERCOM_CLIENT_SECRET-
Do
mix deps.get
Usage
iex> ExIntercom.Conversation.find_all
[%{"assignee" => %{"id" => "...", "type" => "..."}, ...]
iex> ExIntercom.Conversation.find(id: "1")
%{...}
iex> ExIntercom.User.find(id: "1")
%{...}
iex> ExIntercom.oauth_url("http://your_callback_url.com", "your_state")
https://app.intercom.io/oauth?...