---
title: "Open DWS-managed documents in Web SDK"
canonical_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/open-a-document-in-web/"
md_url: "https://www.nutrient.io/guides/dws-viewer/developer-guides/open-a-document-in-web.md"
last_updated: "2026-07-09T00:00:00.000Z"
description: "Learn how to open a document using Nutrient Web SDK with session token authentication and proper configuration."
---

# Open DWS-managed documents in Web SDK

To load a DWS-managed document, pass the document’s session token for authentication in the [configuration](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html) object passed to [`NutrientViewer.load()`](https://www.nutrient.io/api/web/NutrientViewer.html#.load):

## Requirements

DWS Viewer API requires Nutrient Web SDK versions 1.1.1 or later.

## Usage

```js

NutrientViewer.load({
  container: "<container>",
  session: "<session_token>",
});

```

The [`<container>`](https://www.nutrient.io/api/web/NutrientViewer.Configuration.html#container) placeholder in the code above should be replaced by a CSS selector or a DOM element where Nutrient Web SDK will be mounted.

The [`<session_token>`](https://www.nutrient.io/guides/dws-viewer/developer-guides/generate-a-session-token/) placeholder should be replaced by the session token obtained from the DWS Viewer API [dashboard](https://dashboard.nutrient.io/), or by calling [`POST /viewer/sessions`](https://www.nutrient.io/api/reference/viewer/public/#tag/Authorization/operation/generate-session-token) through its [API](https://www.nutrient.io/api/reference/viewer/public/). Session tokens are used for authenticating Nutrient Web SDK clients when connecting to DWS Viewer API.

DWS Viewer API can open DWS-managed documents or app-provided documents. DWS-managed documents are opened with `session`. App-provided documents are opened with `session` and `document`; refer to the [open app-provided documents](https://www.nutrient.io/guides/dws-viewer/developer-guides/open-client-provided-documents.md) guide for more details.

For cross-product overviews of Web SDK, Document Engine, and DWS Viewer API workflows, refer to the [choose the right document opening and loading setup](https://www.nutrient.io/guides/dws-viewer/developer-guides/choose-the-right-document-opening-and-loading-setup.md) and [choose the right search, bookmarks, and document navigation setup](https://www.nutrient.io/guides/dws-viewer/developer-guides/choose-the-right-search-bookmarks-and-document-navigation-setup.md) guides.

## Integration overview

To integrate with a DWS-managed document, you need to:

1. **Upload your document** — First, [upload your document](https://www.nutrient.io/guides/dws-viewer/developer-guides/upload-documents.md) to DWS and obtain the document ID.

2. **Generate a session token** — Use the document ID to [generate a session token](https://www.nutrient.io/guides/dws-viewer/developer-guides/generate-a-session-token.md).

3. **Open the document in Web SDK** — Use the session token to open the document in Nutrient Web SDK.

For a complete server implementation example, refer to the [Node.js integration example](https://www.nutrient.io/guides/dws-viewer/examples/nodejs-integration-example.md) guide.

## Related guides

Refer to the following additional guides:

- [Nutrient Web SDK getting started guides](https://www.nutrient.io/sdk/web/getting-started.md)

- [Nutrient Web SDK detailed documentation](https://www.nutrient.io/guides/web/intro.md)

- [Nutrient Web SDK API reference](https://www.nutrient.io/api/web/)
---

## Related pages

- [Architecture of DWS Viewer API integration](/guides/dws-viewer/developer-guides/architecture.md)
- [Choose the right annotation workflow setup](/guides/dws-viewer/developer-guides/choose-the-right-annotation-workflow-setup.md)
- [DWS Viewer API backend authentication](/guides/dws-viewer/developer-guides/backend-authentication.md)
- [Choose the right collaboration and synchronization setup](/guides/dws-viewer/developer-guides/choose-the-right-collaboration-and-synchronization-setup.md)
- [Choose the right search, bookmarks, and document navigation setup](/guides/dws-viewer/developer-guides/choose-the-right-search-bookmarks-and-document-navigation-setup.md)
- [Choose the right document opening and loading setup](/guides/dws-viewer/developer-guides/choose-the-right-document-opening-and-loading-setup.md)
- [DWS Viewer API client authentication flow](/guides/dws-viewer/developer-guides/client-authentication-flow.md)
- [Choose the right forms workflow setup](/guides/dws-viewer/developer-guides/choose-the-right-forms-workflow-setup.md)
- [Choose the right layers and versioned document state setup](/guides/dws-viewer/developer-guides/choose-the-right-layers-and-versioned-document-state-setup.md)
- [Implement collaboration and synchronization with DWS Viewer API](/guides/dws-viewer/developer-guides/implement-collaboration-and-synchronization-with-dws-viewer-api.md)
- [Dashboard](/guides/dws-viewer/developer-guides/dashboard.md)
- [Generate a session token](/guides/dws-viewer/developer-guides/generate-a-session-token.md)
- [Deployment options](/guides/dws-viewer/developer-guides/deployment-options.md)
- [DWS Viewer API developer guides](/guides/dws-viewer/developer-guides.md)
- [Reviewer-isolated layers](/guides/dws-viewer/developer-guides/reviewer-isolated-layers.md)
- [Upload documents](/guides/dws-viewer/developer-guides/upload-documents.md)
- [Choose the right comments and review workflow setup](/guides/dws-viewer/developer-guides/choose-the-right-comments-and-review-workflow-setup.md)
- [Open app-provided documents in Web SDK](/guides/dws-viewer/developer-guides/open-client-provided-documents.md)
- [Integrate DWS Viewer API with your own backend](/guides/dws-viewer/developer-guides/use-with-your-backend.md)

