Authentication is a key process when integrating with Snapdocs Connect REST API. We recommend using OAuth to authenticate against our REST API.

Authenticating via OAuth requires the following steps:

  1. Create a Client
  2. Generate a JWT token
  3. Make authenticated requests

Create a Client

Our Customer Success member will reach out to you and provide your Client ID, Client Secret, as well as a list of scopes you have access to. These API keys carry many privileges, so be sure to keep them secure!

Generate a JWT token

To obtain an access token, simply make a POST request to the /oauth/token endpoint.

This operation requires the following authentication parameters:

  • client_id - the unique Client ID provided by Snapdocs
  • client_secret - the unique Client Secret provided by Snapdocs
  • grant_type - must be set to client_credentials
  • audience - the API you intend to call using a token generated by this request

📘

Tokens expire after 2 hours. After the call is made, the response will specify how long the bearer token is valid for. We recommend reusing the bearer token until it is expired, then make another call to generate a new token.

Authenticate via Bearer Auth

To authenticate subsequent API requests, ensure to include a valid bearer token in the
HTTP header:

Authorization: Bearer {bearer_token}