Installation
Requires Ruby >= 3.3.0. The SDK is distributed from its GitHub repo (not RubyGems). Clone it, then reference it by path in yourGemfile:
bundle install.
Quick start
Place an outbound call. When the call connects, Vobiz queries youranswer_url webhook, which must return a valid VobizXML document.
Authentication
The Ruby client uses your Auth ID and Auth Token. Find both in the Vobiz Console. Pass your Auth ID asapi_key (mapped to the X-Auth-ID header) and your Auth Token as auth_token (mapped to X-Auth-Token). It is recommended to load credentials from environment variables:
auth_id as a parameter:
VobizXML
When Vobiz calls youranswer_url, your webhook must respond with a VobizXML document that defines the call flow. The gem ships a builder at Vobiz::XML (require "vobiz/xml") — each add_* returns the created child for nesting, and keyword args map to VobizXML attributes:
Prefer the builder, but returning a raw VobizXML string also works. See the VobizXML reference for all verbs and attributes.
Common operations
Live call text-to-speech
Recordings
DID phone management
Error handling
The SDK raisesVobiz::ApiError for any non-2xx response. Inspect the exception for the status code and raw body: