Packages

An Elixir library for working with Intercom using the Intercom API.

Current section

Files

Jump to
intercom_elixir lib intercom api authentication.ex
Raw

lib/intercom/api/authentication.ex

defmodule Intercom.API.Authentication do
@moduledoc false
def get_access_token do
case Application.get_env(:intercom, :access_token, "") do
"" -> {:error, :no_access_token}
access_token when not is_binary(access_token) -> {:error, :invalid_access_token}
access_token -> {:ok, access_token}
end
end
end