Install an API Client
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:
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' )
Install the package:
pip install --upgrade docspring
or
easy_install --upgrade docspring
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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Import and initialize the DocSpring client:
from docspring import Clientclient = Client()
Or provide credentials directly:
from docspring import Clientclient = Client(api_token_id='API_TOKEN_ID', api_token_secret='API_TOKEN_SECRET')
Add docspring-ts to your package.json:
npm install docspring-ts --save
Or with Yarn:
yarn add docspring-ts
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:
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:
import * as DocSpring from "docspring-ts";const apiInstance = new DocSpring.Client();
Or provide credentials directly:
import * as DocSpring from "docspring-ts";const configuration = DocSpring.createConfiguration({ authMethods: { api_token_basic: { username: "API_TOKEN_ID", password: "API_TOKEN_SECRET", }, },});const apiInstance = new DocSpring.Client(configuration);
Install via Composer:
composer require docspring/docspring
Or add to your composer.json:
{ "require": { "docspring/docspring": "*" }}
Then run:
composer 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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Initialize the client:
require 'vendor/autoload.php';
$config = DocSpring\Configuration::getDefaultConfiguration();$api = new DocSpring\Api\Client(null, $config);
Or provide credentials directly:
require 'vendor/autoload.php';
$config = DocSpring\Configuration::getDefaultConfiguration();$config->setUsername('API_TOKEN_ID');$config->setPassword('API_TOKEN_SECRET');$api = new DocSpring\Api\Client(null, $config);
Maven: add to your pom.xml
dependencies:
<dependency> <groupId>com.docspring</groupId> <artifactId>DocSpring</artifactId> <version>1.0.0</version></dependency>
Gradle: add to your build.gradle
:
compile 'com.docspring:DocSpring:1.0.0'
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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Initialize the DocSpring client:
com.docspring.ApiClient apiClient = com.docspring.Configuration.getDefaultApiClient();com.docspring.Client api = new com.docspring.Client(apiClient);
Or provide credentials directly:
com.docspring.ApiClient apiClient = com.docspring.Configuration.getDefaultApiClient();apiClient.setUsername("API_TOKEN_ID");apiClient.setPassword("API_TOKEN_SECRET");com.docspring.Client api = new com.docspring.Client(apiClient);
Install from NuGet:
Package Manager
PM> Install-Package DocSpring.Client
.NET CLI
dotnet add package DocSpring.Client
Paket CLI
paket add DocSpring.Client
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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Initialize the client:
var api = DocSpring.Client.Client.EnvClientFactory.NewClient();
Or provide credentials directly:
var api = DocSpring.Client.Client.EnvClientFactory.NewClient("API_TOKEN_ID", "API_TOKEN_SECRET");
Install the package:
go get github.com/DocSpring/docspring-go
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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Import and initialize the client:
import ( client "github.com/docspring/docspring-go")
apiClient := client.NewClient("", "")
Or provide credentials directly:
apiClient := client.NewClient("API_TOKEN_ID", "API_TOKEN_SECRET")
Add to your mix.exs
dependencies:
def deps do [ {:docspring, "~> 2.1.0"} ]end
Then run:
mix deps.get
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:
export DOCSPRING_REGION="US" # US or EU (defaults to US)export DOCSPRING_HOST="docspring.yourcompany.com" # For on-premise deployments
Initialize the client connection and module:
conn = Docspring.Connection.new()api = Docspring.Api.Client
Add docspring to your package.json:
npm install docspring --save
Or with Yarn:
yarn add docspring
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:
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:
const DocSpring = require("docspring");const apiInstance = new DocSpring.Client();
Or provide credentials directly:
const DocSpring = require("docspring");const apiInstance = new DocSpring.Client({ apiTokenId: "API_TOKEN_ID", apiTokenSecret: "API_TOKEN_SECRET",});
If you would like DocSpring to support a new language, please send us an email at: [email protected]
We define our API endpoints and request/response schemas with an OpenAPI Specification (formerly known as Swagger). We use openapi-generator to automatically generate our API clients.