---
title: Errori
project: OpenTemplates
version: 1.0
section: reference
language: it
license: MIT
url: https://totaljs.es/docs/it/opentemplates/1-0/reference/errors/
updated: 2026-11-19T07:56:21.394Z
---

# Errori

> Gli errori che restituisce la REST API e cosa fare.

Gli errori dell'endpoint di generazione tornano come array JSON con un testo `error`.

| Stato | Risposta | Cosa fare |
|---|---|---|
| `400` | `[{"error":"Invalid template ID"}]` | Invia il campo `id`. |
| `400` | `[{"error":"Template not found"}]` | Controlla l'ID del template, per esempio `demo/invoice`. Usa gli identificatori del profilo e del template, come compaiono sulla scheda del template. |
| `401` | Una pagina HTML che dice `401 Unauthorized` | Il token manca o è sbagliato, oppure l'indirizzo è bloccato dopo troppi token sbagliati. |
| `401` | `[{"name":"401","error":"401: Unauthorized"}]` | Su `/profiles/`: il token non ha **Allow read list of profiles**. |

## Bloccato dopo token sbagliati

Dopo più di cinque richieste con un token sbagliato da un indirizzo, OpenTemplates risponde `401` a ogni richiesta da quell'indirizzo, anche con un token corretto. Il blocco finisce da solo entro 15 minuti. Correggi il token nella tua app e aspetta prima di riprovare.
