Current section
Files
Jump to
Current section
Files
lib/intercom/api/rest.ex
defmodule Intercom.API.Rest do
@moduledoc false
def url(path) do
"https://api.intercom.io/" <> path
end
def authorized_headers do
case Intercom.API.Authentication.get_access_token() do
{:ok, access_token} ->
{:ok,
[
Authorization: "Bearer #{access_token}",
Accept: "application/json",
"Content-Type": "application/json"
]}
{:error, error} ->
{:error, error}
end
end
end