---
title: Tokens and access
project: OpenTemplates
version: 1.0
section: faq
language: en
license: MIT
url: https://totaljs.es/docs/opentemplates/1-0/faq/access/
updated: 2026-11-19T07:56:12.327Z
---

# Tokens and access

> Questions about the primary access token and the API tokens.

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

Stop OpenTemplates and open `databases/memorize_data.json`. The token is the value of `token` in the `config` part. Copy it, start OpenTemplates and open `/setup/?token=...`. Keep the token in a password manager from now on.

## Why does the interface answer 401?

The address has no `?token=` or the token is wrong. Open `/setup/?token=YOUR_PRIMARY_TOKEN`. After more than five wrong tokens from your address, OpenTemplates blocks it for up to 15 minutes.

## Why does my app get 401 with the right token?

Check three things:

- The app uses an [API token](../../guides/api-tokens/) from **Tokens**, not the primary access token.
- The token is in the `x-token` header or the `token` query argument.
- The address of the app is not blocked after wrong tokens. The block ends within 15 minutes.

## How do I lock out an app?

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

## Do tokens expire?

No. A token works until you change it.
