Explicit connection configuration, passed as the first argument to every resource call (or omitted — a default client is built from the environment).
client = Noizu.WhatsApp.Client.new(token: System.fetch_env!("WHATSAPP_ACCESS_TOKEN"))
{:ok, resp} = Noizu.WhatsApp.Messages.send_text(client, "+14155551234", "hi")Precedence
Each field follows opts -> Application.get_env(:noizu_whatsapp, :client) ->
environment variable:
:token—WHATSAPP_ACCESS_TOKEN(bearer auth). May benilat construction; requests needing it fail withtag: :config.:phone_number_id—WHATSAPP_PHONE_NUMBER_ID(messages/media root).:waba_id—WHATSAPP_BUSINESS_ACCOUNT_ID(template listing).
Summary
Functions
Default Graph API root (https://graph.facebook.com).
Default Graph API version (v21.0).
Builds a client struct. See the module doc for option details.