View Source WorkOS (WorkOS SDK for Elixir v1.1.0)
Documentation for WorkOS
.
Summary
Functions
Retrieves the WorkOS API key from application config.
Retrieves the WorkOS base URL from application config.
Returns a WorkOS client.
Retrieves the WorkOS client ID from application config.
Loads config values from the application environment.
Defines the WorkOS base API URL
Types
Functions
@spec api_key() :: String.t()
Retrieves the WorkOS API key from application config.
@spec api_key(WorkOS.Client.t()) :: String.t()
@spec base_url() :: String.t()
Retrieves the WorkOS base URL from application config.
@spec client(config()) :: WorkOS.Client.t()
Returns a WorkOS client.
Accepts a keyword list of config opts, though if omitted then it will attempt to load them from the application environment.
@spec client_id() :: String.t()
Retrieves the WorkOS client ID from application config.
@spec client_id(WorkOS.Client.t()) :: String.t()
@spec config() :: config()
Loads config values from the application environment.
Config options are as follows:
config :workos, WorkOS.Client
api_key: "sk_123",
client_id: "project_123",
base_url: "https://api.workos.com",
client: WorkOs.Client.TeslaClient
The only required config option is :api_key
and :client_id
. If you would like to replace the
HTTP client used by WorkOS, configure the :client
option. By default, this library
uses Tesla, but changing it is as easy as
defining your own client module. See the WorkOS.Client
module docs for more info.
Defines the WorkOS base API URL