<!-- llms.txt: https://workos.com/llms.txt -->

# Widgets

Widgets are React components that provide complete functionality for common enterprise app workflows.

## Generate a widget token

Generate a widget token for a user, optionally scoped to an organization. When an organization is specified, org-scoped widgets are enabled; omitting it issues a user-only token for widgets like `UserProfile` and `UserSecurity`.

#### Request

#### Response

### /widgets/token

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organization_id` | string | No | An [Organization](/reference/organization) identifier. |
| `user_id` | string | No | A [User](/reference/authkit/user) identifier. |
| `scopes` | ("widgets:users-table:manage" \| "widgets:domain-verification:manage" \| "widgets:sso:manage" \| ...)[] | No | Scopes to include in the widget token. If a user_id is provided, the requested scopes will be also be restricted to the permissions that the user has in the requested organization. |