---
title: "DWS Viewer API client authentication flow"
canonical_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/client-authentication-flow/"
md_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/client-authentication-flow.md"
last_updated: "2026-05-27T13:10:05.652Z"
description: "Understand how the client authentication flow works in DWS Viewer API using session tokens and JWTs to securely access documents."
---

# DWS Viewer API client authentication flow

DWS Viewer API uses [JSON Web Tokens](https://jwt.io/) (JWTs) for authenticating its Nutrient Web SDK clients:

1. Your backend [creates a session token](https://www.nutrient.io/guides/dws-viewer/developer-guides/generate-a-session-token.md) for a particular document via DWS Viewer API’s backend API.

2. Next, it passes the session token to your client apps that use Nutrient Web SDK.

3. Your app then [passes the session token](https://www.nutrient.io/guides/dws-viewer/developer-guides/open-a-document-in-web.md) when loading Nutrient Web SDK. It uses it to prove it has access to the claimed DWS Viewer API document.![The session token is generated and verified by DWS Viewer API](@/assets/guides/dws-viewer/authentication.png)
---

## Related pages

- [DWS Viewer API backend authentication](/guides/dws-viewer/developer-guides/backend-authentication.md)
- [Architecture of DWS Viewer API integration](/guides/dws-viewer/developer-guides/architecture.md)
- [Generate a session token](/guides/dws-viewer/developer-guides/generate-a-session-token.md)
- [DWS Viewer API developer guides](/guides/dws-viewer/developer-guides.md)
- [Upload documents](/guides/dws-viewer/developer-guides/upload-documents.md)
- [Dashboard](/guides/dws-viewer/developer-guides/dashboard.md)
- [Open a document in Web SDK](/guides/dws-viewer/developer-guides/open-a-document-in-web.md)
- [Integrate DWS Viewer API with your own backend](/guides/dws-viewer/developer-guides/use-with-your-backend.md)
- [Deployment options](/guides/dws-viewer/developer-guides/deployment-options.md)

