InsionInsion
Ruby

Configuration

Configure Ruby authentication, retries, timeouts, and request overrides

Overview

Configuration is optional. The SDK's defaults are suitable for most integrations, so you only need this guide when you want fine-grained control over behavior such as retries, timeouts, and per-request overrides.

require "insion"

client = Insion::Client.new(
  token: ENV.fetch("INSION_API_KEY"),
  max_retries: 2
)

Keep the API key on a trusted server. Never expose it in client applications, logs, or source control.

The default retry limit is two and the default timeout is 60 seconds.

Per-request options

Methods accept request_options for additional headers, query parameters, body parameters, and a per-call timeout.

client.list_records(
  limit: 50,
  request_options: {
    timeout_in_seconds: 10,
    additional_headers: { "X-Request-ID" => "req-123" },
    additional_query_parameters: { "trace" => "true" }
  }
)

How is this guide?

On this page

Latest Release

View the Ruby SDK on RubyGemsRuby SDK versionRuby SDK license