> ## Documentation Index
> Fetch the complete documentation index at: https://docs.papermap.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Embed Token

> Generate a temporary token for testing embedded dashboards. This token allows you to preview and test your dashboard embedding configuration before implementing it in production.



## OpenAPI

````yaml /api-reference/embedding/embed-openapi.json post /api/v1/embed/generate-token
openapi: 3.1.0
info:
  title: Papermap Embed API
  version: 1.0.0
servers:
  - url: https://papermap.ai/
security: []
paths:
  /api/v1/embed/generate-token:
    post:
      summary: Generate Embed Token
      description: >-
        Generate a temporary token for testing embedded dashboards. This token
        allows you to preview and test your dashboard embedding configuration
        before implementing it in production.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: ID of the workspace
                api_key_id:
                  type: string
                  description: Your API Key ID (starts with ak_)
                secret_key:
                  type: string
                  description: Your Secret Key (starts with sk_)
                dashboard_id:
                  type: string
                  description: ID of the dashboard to embed
                validity_duration:
                  type: integer
                  description: Token validity duration in seconds
                  default: 3600
              required:
                - workspace_id
                - api_key_id
                - secret_key
                - dashboard_id
            example:
              workspace_id: string
              api_key_id: string
              secret_key: string
              dashboard_id: string
              validity_duration: 3600
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the request was successful
                  message:
                    type: string
                    description: Response message
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        description: The generated embed token
                      expires_at:
                        type: string
                        format: date-time
                        description: Token expiration timestamp
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        success:
          type: boolean
          enum:
            - false
        data:
          type: 'null'

````