> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.11.0/deployment/configuration/application-server/access-key.md).

# Access key

Access key is an optional authentication mechanism for selected API endpoints.

It is used for:

* [Custom dictionary API](/v6.11.0/api-reference/custom-dictionary-api.md)
* [Style guide API](/v6.11.0/api-reference/style-guide-api.md)

You can also enforce it for **all API commands**.

That requires an [API gateway](https://github.com/WebSpellChecker/api-gateway-demo).

The gateway must add the access key to every request.

{% hint style="warning" %}
If you enable an access key for all commands without a gateway, requests from front-end will fail.
{% endhint %}

{% tabs %}
{% tab title="On-premises (Linux/Windows)" %}
Configure access key in `AppServerX.xml`.

Follow the safe edit workflow in [Editing AppServerX.xml](/v6.11.0/deployment/configuration/application-server/editing-appserverx.xml.md).

```xml
<Authentication>
	<!-- Manually create and enter a unique access key for using the custom dictionary and style guide API.
	It must be at least 20 characters, comprising upper and lower case letters and digits. -->
	<AccessKey></AccessKey>
	<!-- You can enable access key for all API commands here. -->
	<UseAccessKeyForAllCommands>false</UseAccessKeyForAllCommands>
</Authentication>
```

{% endtab %}

{% tab title="Docker" %}
Set these environment variables:

* `WPR_ACCESS_KEY`
* `WPR_USE_ACCESS_KEY_FOR_ALL_COMMANDS`
  {% endtab %}

{% tab title="Cloud" %}
Generate and manage access keys in the admin panel:

* [**Credentials**](https://app.wproofreader.com/credentials)
  {% endtab %}
  {% endtabs %}


---

# 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 current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/v6.11.0/deployment/configuration/application-server/access-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
