Nutrient

SDK

Cloud

Low-Code

Workflow

DWS Viewer API authentication

Requests to the DWS Viewer API are protected by a secret API key.

API key authentication

The API key for your DWS Viewer API application can be retrieved from the dashboard.

DWS Viewer API dashboard

Because the API allows full access to data stored in your DWS Viewer API application, it’s only meant to be used by your backend services, which we assume are fully trusted. To view documents from DWS Viewer API in the browser using Nutrient Web SDK, you’ll need to use session tokens that can be handed out to users.

Using the API key

Each API request needs to be authenticated by providing the Authorization: Bearer your_api_key_here header:

curl -X POST https://api.nutrient.io/viewer/documents \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/pdf" \
  --fail \
  -F [email protected]
curl -X POST https://api.nutrient.io/viewer/documents ^
  -H "Authorization: Bearer your_api_key_here" ^
  -H "Content-Type: application/pdf" ^
  --fail ^
  -F [email protected]
POST https://api.nutrient.io/viewer/documents HTTP/1.1
Content-Type: multipart/form-data; boundary=--customboundary
Authorization: Bearer your_api_key_hereContent-Type: application/pdf

--customboundary
Content-Disposition: form-data; name="file"; filename="document.pdf"
Content-Type: application/pdf

(file data)
--customboundary--