> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avatcado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# forbidden

> Error: access to this resource is forbidden

# forbidden

<Info>HTTP Status: **403 Forbidden**</Info>

## Example response

```json theme={null}
{
  "error": {
    "code": "forbidden",
    "message": "Demo key is restricted to GET /v1/validate and GET /v1/rates",
    "docs_url": "https://docs.avatcado.com/errors/forbidden"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

## What happened?

Your API key does not have permission to access the requested resource. This typically occurs when:

* Using the **demo key** on an endpoint other than `GET /v1/validate` or `GET /v1/rates`
* The demo key is restricted to read-only validation and rate lookups

## How to fix

1. **Use a full API key**. Sign up at [avatcado.com](https://avatcado.com) and generate a `avat_live_` key to access all endpoints.
2. **Check the endpoint**. The demo key only works with `GET /v1/validate` and `GET /v1/rates`.

## Catching this error with the SDKs

<CodeGroup>
  ```typescript @avatcado/node theme={null}
  import Avatcado, { AuthenticationError } from '@avatcado/node';

  const avatcado = new Avatcado('avat_live_your_api_key');
  const { data, error } = await avatcado.vat.validate({ vatNumber: '...' });

  if (error instanceof AuthenticationError) {
    console.log(error.message);
  }
  ```

  ```python Python theme={null}
  from avatcado import Avatcado, AuthenticationError

  avatcado = Avatcado("avat_live_your_api_key")

  try:
      result = avatcado.vat.validate("...")
  except AuthenticationError as e:
      print(e.message)
  ```
</CodeGroup>

## Related errors

* [`unauthorized`](/errors/unauthorized): API key is missing or invalid
* [`tier_insufficient`](/errors/tier_insufficient): Feature requires a higher tier
