Global configuration
Default client
After configuring globally, access a shared client singleton:WhatsrbCloud.reset_configuration!.
Per-client configuration
Rails initializer
Createconfig/initializers/whatsrb.rb:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Configure the WhatsRB Cloud Ruby SDK.
WhatsrbCloud.configure do |c|
c.api_key = ENV["WHATSRB_API_KEY"]
c.base_url = "https://whatsrb.com" # default
c.timeout = 30 # seconds, default
end
WhatsrbCloud.configure do |c|
c.api_key = ENV["WHATSRB_API_KEY"]
end
# Uses the global configuration — no need to instantiate
WhatsrbCloud.client.agents.list
WhatsrbCloud.client.webhooks.list
WhatsrbCloud.reset_configuration!.
client = WhatsrbCloud::Client.new(
api_key: "wrb_live_xxx",
base_url: "https://whatsrb.com",
timeout: 30
)
config/initializers/whatsrb.rb:
WhatsrbCloud.configure do |c|
c.api_key = Rails.application.credentials.whatsrb_api_key
end
| Option | Default | Description |
|---|---|---|
api_key | — | Your WhatsRB API key (required) |
base_url | https://whatsrb.com | API base URL |
timeout | 30 | Request timeout in seconds |
