API Authentication

DocSpring uses API tokens for authentication. You must authenticate using HTTP basic authentication. Use your API token ID as the username, and the API token secret as the password.

You must send an Authorization header with the value Basic followed by base 64 encoded token_id:token_secret.

For example: Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==

You can manage your API tokens on the API Tokens page.

Our API includes an /authentication endpoint that you can use to make sure your API tokens are valid.

Test Authentication

// This is a live example that you can run with Node

var DocSpring = require('docspring')

var config = new DocSpring.Configuration()
config.apiTokenId = 'yRaaR9JmTPtGX7EN'
config.apiTokenSecret = 'IB3TRkSdm4f2BdtU_D3YgxjdMB7l-r2fOgvxD1Yzwec'
client = new DocSpring.Client(config)

client.testAuthentication(function (error, response) {
  if (error) throw error
  console.log(response)
})

results matching ""

    No results matching ""