Skip to content
Start free

Install an API Client

Open in ClaudeOpen in ChatGPT

Choose your preferred programming language to get started with the DocSpring API.

Add the following line to your Gemfile:

gem "docspring"

Then run:

bundle install

Configure authentication via environment variables:

export DOCSPRING_TOKEN_ID="API_TOKEN_ID"
export DOCSPRING_TOKEN_SECRET="API_TOKEN_SECRET"

You can also configure the region or host. The host takes priority over the region:

export DOCSPRING_REGION="US" # US or EU (defaults to US)
export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments

Initialize the DocSpring client with no arguments:

client = DocSpring::Client.new

Or pass credentials directly as arguments:

client = DocSpring::Client.new(
api_token_id: 'API_TOKEN_ID',
api_token_secret: 'API_TOKEN_SECRET'
)