---
title: "Generate Document Picker Token"
method: POST
path: "/v1/documents/pickerToken"
tags: ["Document Picker"]
---

# Generate Document Picker Token

`POST /v1/documents/pickerToken`

Generates a token that can be used to embed a document picker for the specified product. Only documents for the specified product are shown in the picker.

## Request body

- object
  - `product` 'lucidchart' | 'lucidscale' | 'lucidspark' — Determines which product is used for the document picker. Only documents for this product are shown.
  - `targetOrigin` string — The domain that will be used to host the webpage in which the document picker will be embedded. This will be used as the targetOrigin parameter in a call to window.postMessage when the user selects a document.

## Response `200`

OK - with valid token that can be used to embed a document picker.

## Other responses

- `400` — Bad Request - when parameters are missing or invalid.
- `403` — Forbidden - when the access token is not allowed to generate a document picker token for the provided product.

---

[API](https://skmtc.net/lucid/apis/lucid-rest-api.md) · [All operations](https://skmtc.net/lucid/apis/lucid-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lucid/lucid-rest-api/revisions/6a32cb9e1aa7/schema)
