# 授權

> 取得 Univer Office SDK 授權並在瀏覽器應用程式中設定。

- Human documentation: [https://docs.univer.ai/zh-TW/server/license](https://docs.univer.ai/zh-TW/server/license)

- Agent Markdown: [https://docs.univer.ai/zh-TW/server/license.md](https://docs.univer.ai/zh-TW/server/license.md)

- Requested language: `zh-TW`

- Content language: `zh-TW`

- Documentation version: `1.2.0`

- Source: [license.zh-TW.mdx](https://github.com/dream-num/documentation/blob/dev/content/server/license.zh-TW.mdx)

---

若功能需要授權，請前往 [Univer 網站](https://univer.ai)了解授權方案並取得授權。依專案使用的預設集模式或外掛模式，設定**用戶端授權內容**。

## 外掛模式

在既有 Univer 執行個體上，先於其他外掛註冊 `UniverLicensePlugin`：

```ts
import { UniverLicensePlugin } from '@univerjs-pro/license'

univer.registerPlugin(UniverLicensePlugin, {
  license: 'YOUR_CLIENT_LICENSE',
})
```

## 預設集模式

在現有預設集設定中加入 `license`。例如使用 `UniverSheetsAdvancedPreset`：

```ts
UniverSheetsAdvancedPreset({
  // Keep your other options and replace this placeholder with the client license content.
  license: 'YOUR_CLIENT_LICENSE',
})
```

請提供授權內容，不是授權檔案路徑。

## 協同應用程式

協同應用程式同樣在瀏覽器中設定授權。[協同快速開始](https://docs.univer.ai/zh-TW/server/collaboration/quick-start.md)的瀏覽器範例展示如何與協同外掛一起註冊授權外掛。瀏覽器與伺服器套件版本應符合 [SDK 環境與版本要求](https://docs.univer.ai/zh-TW/server/requirements.md)。

授權決定可用的功能，應用程式權限則決定誰可檢視或編輯文件。完成授權設定後，請依[伺服器整合](https://docs.univer.ai/zh-TW/server.md)接入登入與文件權限。

## 檢查設定

重新開啟應用程式並測試所需功能。若浮水印或授權限制仍然存在，請檢查授權內容是否完整、有效，且涵蓋所需功能與版本。外掛模式還需檢查註冊順序。若問題持續，請聯絡授權提供者。
