Skip to content

Troubleshooting

figorr edited this page Sep 10, 2025 · 9 revisions

Troubleshooting (FAQ)


❌ API Key errors

  • Symptom: Log shows ForbiddenError.
  • Cause: API Key invalid or lacking permissions.
  • Solution: Verify that your API Key is valid in Meteocat API portal.

✅ How to check your API Key permissions

You can test your API Key using Postman or any software that allows making HTTP GET requests.

  1. Download Postman (https://www.postman.com/downloads/) or a similar tool.
  2. Create a new GET request.
  3. Use the following URLs to test different resources of the Meteocat API:

alt

alt

alt

  • Quotes: https://api.meteo.cat/quotes/v1/consum-actual

    And you should see something like this:

    {
        "client": {
            "nom": "XXX XXXXXXXX"
        },
        "plans": [
            {
                "nom": "Referència Bàsic",
                "periode": "Mensual",
                "maxConsultes": 2000,
                "consultesRestants": 2000,
                "consultesRealitzades": 0
            },
            {
                "nom": "XDDE_250",
                "periode": "Mensual",
                "maxConsultes": 250,
                "consultesRestants": 249,
                "consultesRealitzades": 1
            },
            {
                "nom": "Quota",
                "periode": "Mensual",
                "maxConsultes": 300,
                "consultesRestants": 299,
                "consultesRealitzades": 1
            },
            {
                "nom": "Predicció_100",
                "periode": "Mensual",
                "maxConsultes": 100,
                "consultesRestants": 98,
                "consultesRealitzades": 2
            },
            {
                "nom": "XEMA_750 OD",
                "periode": "Mensual",
                "maxConsultes": 750,
                "consultesRestants": 747,
                "consultesRealitzades": 3
            }
        ]
    }
    
  1. Add the required headers for authentication. For Meteocat API:

    • Content-Type: application/json
    • x-api-key: YOUR_API_KEY
  2. Send the GET request.

    • If the request returns HTTP 200, the API Key has permission for that resource.
    • If it returns HTTP 403 (Forbidden), your API Key lacks the required permission.
    • If it returns HTTP 401 (Unauthorized), the API Key is invalid.

ℹ️ You can repeat these tests for each resource (towns, stations, variables, symbols, quotes) to check which permissions are enabled.


❌ Missing assets

  • Symptom: Integration fails or towns/stations list is empty.
  • Cause: Some assets/*.json files are missing.
  • Solution: Use the Regenerate assets option from the configuration menu.

alt


❌ Connection problems

  • Symptom: Integration does not load data.
  • Cause: Meteocat API unavailable.
  • Solution: Wait and retry later. The integration will continue working with cached data.

⬅️ Options | ➡️ Contributing

Clone this wiki locally