Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vatly.dev/llms.txt

Use this file to discover all available pages before exploring further.

forbidden

HTTP Status: 403 Forbidden

Example response

{
  "error": {
    "code": "forbidden",
    "message": "Demo key is restricted to GET /v1/validate and GET /v1/rates",
    "docs_url": "https://docs.vatly.dev/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 vatly.dev and generate a vtly_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

import Vatly, { AuthenticationError } from '@vatly/node';

const vatly = new Vatly('vtly_live_your_api_key');
const { data, error } = await vatly.vat.validate({ vatNumber: '...' });

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