> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Zotero 整合

<Info>
  此功能最初由 [davrot](https://github.com/davrot) 與 [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep) 開發，並由 [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro) 修改為使用 OAuth。此功能自 v6.2.0 起推出，目前仍處於測試（beta）階段。若你遇到任何問題，歡迎提供意見回饋。
</Info>

<Frame>
  <img src="https://mintcdn.com/ayakaleaf-pro/x9kfDjtWlyyhG_mR/images/on-premises/img-b751b9f6.png?fit=max&auto=format&n=x9kfDjtWlyyhG_mR&q=85&s=80eb902caf484c8cfc1c776017ac2c66" alt="" width="1802" height="372" data-path="images/on-premises/img-b751b9f6.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/ayakaleaf-pro/x9kfDjtWlyyhG_mR/images/on-premises/image-40.png?fit=max&auto=format&n=x9kfDjtWlyyhG_mR&q=85&s=6dc6bfdbc9f196d6b0e52e331dcebeb1" alt="" width="1524" height="1116" data-path="images/on-premises/image-40.png" />
</Frame>

### 設定 Zotero 整合

1. 開啟[此連結](https://www.zotero.org/oauth/apps)建立 Zotero OAuth 用戶端（如圖所示）
2. 將 **Application Type** 選擇為 **Browser**
3. 將 Callback URL 設定為你的 `${OVERLEAF_SITE_URL}/user/zotero/oauth/callback`
4. 設定你的 `config/variables.env`

<Frame>
  <img src="https://mintcdn.com/ayakaleaf-pro/x9kfDjtWlyyhG_mR/images/on-premises/image-41.png?fit=max&auto=format&n=x9kfDjtWlyyhG_mR&q=85&s=7b17a5456fed177a76d4adfe2daf8107" alt="" width="375" data-path="images/on-premises/image-41.png" />
</Frame>

```dotenv title="config/variables.env" theme={null}
#################
#    Zotero     #
#################
# 'zotero' must be in ENABLED_LINKED_FILE_TYPES (set in develop/docker-compose.yml)
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url,zotero

# From a Zotero OAuth client (register at https://www.zotero.org/oauth/apps)
# Application Type: Browser 
# Callback URL -> ${OVERLEAF_SITE_URL}/user/zotero/oauth/callback
ZOTERO_CLIENT_ID=
ZOTERO_CLIENT_SECRET=
# Encrypts the Zotero API key in mongo (set in dev to avoid writing a key file
# to /var/lib/overleaf/data, which the dev web container can't create)
# How to generate: `openssl rand -hex 32`
ZOTERO_CIPHER_PASSWORD=dev-zotero-cipher-password
# Optional: route the module's server-side Zotero requests (OAuth + API) through
# an HTTP proxy (must be reachable from the web container; same as github-sync)
# http://10.0.0.1:10808
# (Optional) ZOTERO_PROXY_URL=
```

### 注意事項

<Warning>
  將已有 Zotero 連結參考文獻檔案的既有安裝升級至重新發布的 6.3.0 時，請依照 [Zotero / Mendeley 遷移說明](/zh-TW/on-premises/release-notes/release-notes-6.x.x#ayakaleaf-pro-6.3.0 "mention")進行。全新安裝則不需要進行此遷移。
</Warning>

<Danger>
  由於 Ayakaleaf 是一個協作平台，為了提升安全性，從 6.3.0 版開始，只有參考文獻 `bib` 檔案的原始建立者才能更新匯入的檔案。
</Danger>

例如，假設專案擁有者使用者 A 啟用了連結分享，並在專案中建立了 `test.bib` 檔案，將其連結到自己的 Zotero 帳號。若另一位使用者 B 透過分享連結存取此專案，使用者 B 仍可讀取並下載 `test.bib`，但無法從 Zotero 更新或重新匯入該檔案。只有身為參考文獻檔案原始建立者的使用者 A 才能執行更新。換句話說，只有 `.bib` 檔案的原始建立者才有權限更新它。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.