ErrorsAll codes
ENV_MISMATCH
API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs
Category: VeriFactu
Example response
When this error occurs, the API returns a JSON response with the following shape:
{
"type": "https://docs.beel.es/errors/ENV_MISMATCH",
"title": "ENV_MISMATCH",
"detail": "API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs",
"instance": "/v1/<resource>",
"errors": [],
"success": false,
"error": {
"code": "ENV_MISMATCH",
"message": "API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs",
"details": {}
},
"meta": {
"timestamp": "2026-05-21T10:00:00Z",
"request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
}The type URI is stable and always resolves to this page.
Message
API key does not match NIF environment: use a live key for production NIFs and a test key for sandbox NIFs
La API key no coincide con el entorno del NIF: usa una key de producción para NIFs reales y una key de test para NIFs de pruebas
La clau d''API no coincideix amb l''entorn del NIF: utilitza una clau de producció per a NIFs reals i una clau de test per a NIFs de proves
Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.
Other errors in this category
ALREADY_DISABLED
VeriFactu is already disabled for this user
ALREADY_ENABLED
VeriFactu is already enabled for this user
ALREADY_REGISTERED
The NIF is already registered in VeriFactu
API_COMMUNICATION_ERROR
Error communicating with the VeriFactu API
API_KEY_NOT_CONFIGURED
The VeriFactu API key has not been configured