> 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.12.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.12.0/api-reference/custom-dictionary-api.md)
* [Style guide API](/v6.12.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.12.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 %}
