> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/configuration/overleaf-toolkit/mendeley-integration.md).

# Mendeley Integration

{% hint style="info" %}
This capability is provided by [ayaka-notes/ayakaleaf-pro](https://github.com/ayaka-notes/ayakaleaf-pro) with OAuth 2.0 support and is available from v6.3.0. We welcome your feedback if you encounter any problems.
{% endhint %}

#### Setup Mendeley Integration

1. Navigate to [this link](https://dev.mendeley.com/myapps.html) to register a Mendeley OAuth application
2. Configure **Redirect URL** as: `${OVERLEAF_SITE_URL}/user/mendeley/oauth/callback`
3. Note the generated **ID** (ususally digital like `24061` as below) and **Secret** of your application
4. Modify your `config/variables.env`
5. Just keep Authorisation Flow: Elsevier (as recommended)

<figure><img src="https://2052729351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyLFrF2L1FakWXkhqpOnS%2Fuploads%2FvQdcWCLi2oOwh6sIzv8d%2Fimage.png?alt=media&amp;token=76e15441-0111-4800-ab81-894fc3098c03" alt=""><figcaption></figcaption></figure>

<pre class="language-dotenv" data-title="config/variables.env"><code class="lang-dotenv">#################
#   Mendeley    #
#################
# 'mendeley' must be in ENABLED_LINKED_FILE_TYPES (keep 'zotero' too if you use both)
<strong>ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url,mendeley
</strong>
# From a Mendeley OAuth application (register at https://dev.mendeley.com/myapps.html)
# Redirect URL -> ${OVERLEAF_SITE_URL}/user/mendeley/oauth/callback
MENDELEY_CLIENT_ID=
MENDELEY_CLIENT_SECRET=
# Encrypts the Mendeley OAuth tokens in mongo; if unset, a key file is generated
# in /var/lib/overleaf/data on first use
# How to generate: `openssl rand -hex 32`
MENDELEY_CIPHER_PASSWORD=
# Optional: route the module's server-side Mendeley 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) MENDELEY_PROXY_URL=
</code></pre>

{% hint style="info" %}
`mendeley` must be included in `ENABLED_LINKED_FILE_TYPES` (keep `zotero` in the list too if you use both). `MENDELEY_CLIENT_ID` and `MENDELEY_CLIENT_SECRET` come from your registered OAuth application. The cipher password encrypts the Mendeley OAuth tokens in MongoDB (generate one via `openssl rand -hex 32`); without it a key file is generated in the data volume on first use. Optionally set `MENDELEY_PROXY_URL` to route the server-side Mendeley requests (OAuth + API) through an HTTP proxy accessible from the web container.
{% endhint %}

### Notes

{% hint style="warning" %}
When upgrading an existing installation with Mendeley linked bibliography files to the re-released 6.3.0, follow the [/pages/LqnXZKjrD6n3rtGy6jbi#ayakaleaf-pro-6.3.0](https://ayakaleaf-pro.ayaka.space/on-premises/configuration/overleaf-toolkit/pages/LqnXZKjrD6n3rtGy6jbi#ayakaleaf-pro-6.3.0 "mention"). New installations do not need this migration.
{% endhint %}

{% hint style="danger" %}
Since Ayakaleaf is a collaborative platform, to improve security, starting with version 6.3.0, only the original creator of a Reference `bib` file will be allowed to update the imported file.
{% endhint %}

For example, suppose the project owner, User A, enables link sharing and creates a `test.bib` file in the project, linking it to their own Zotero account. If another user, User B, accesses the project through the shared link, User B will still be able to read and download `test.bib`, but will not be allowed to update or re-import the file from Zotero. Only User A, as the original creator of the Reference file, can perform updates. Conversely, only the original creator of the `.bib` file has permission to update it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/configuration/overleaf-toolkit/mendeley-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
