---
title: Access and tokens
project: OpenMail
version: 1.0
section: faq
language: en
license: MIT
url: https://totaljs.es/docs/openmail/1-0/faq/access/
updated: 2026-11-19T07:58:00.462Z
---

# Access and tokens

> Questions about the primary access token and API tokens.

## I lost the primary access token. How do I get back in?

**1.** Stop OpenMail.

**2.** Open `databases/memorize_data.json` in a text editor. In the `config` section, set `token` to an empty value:

```json
"token": "",
```

**3.** Start OpenMail and open `/setup/`. It opens without a token.

**4.** Set a new token right away in **Configuration**. See [First start](../../guides/first-start/).

## Can my app use the primary access token to send email?

No. The primary access token opens only the admin interface. Create an [API token](../../guides/api-tokens/) for your app.

## How do I stop a token from working?

Open the token in **Tokens**, change **Access token** to a new random value and click **SUBMIT**. The old value stops working at once. See [API tokens](../../guides/api-tokens/).

## My app gets 401 although the token is right. Why?

OpenMail blocks an IP address for up to 15 minutes after six requests with a wrong token, even when the next requests have a valid token. Wait, or restart OpenMail. See [Errors](../../reference/errors/).
