{"record":{"id":"fd9863814c4502d0","repo":"OpenBB-finance/OpenBB","slug":"unauthorized-intrinio-request-message","errorCode":null,"errorMessage":"Unauthorized Intrinio request -> {message}","messagePattern":"Unauthorized Intrinio request -> (.+?)","errorType":"exception","errorClass":"UnauthorizedError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py","lineNumber":140,"sourceCode":"            if not data or not consensus:\n                warn(f\"Symbol Error: No data found for {symbol}\")\n            if consensus:\n                results.extend(consensus)\n\n        if symbols:\n            await asyncio.gather(*[get_one(symbol) for symbol in symbols])\n            if not results:\n                raise EmptyDataError(f\"No results were found. -> {query.symbol}\")\n            return results\n\n        async def fetch_callback(response, session):\n            \"\"\"Use callback for pagination.\"\"\"\n            data = await response.json()\n            error = data.get(\"error\", None)\n            if error:\n                message = data.get(\"message\", \"\")\n                if \"api key\" in message.lower():\n                    raise UnauthorizedError(\n                        f\"Unauthorized Intrinio request -> {message}\"\n                    )\n                raise OpenBBError(f\"Error: {error} -> {message}\")\n\n            estimates = data.get(\"ebitda_consensus\", [])  # type: ignore\n            if estimates and len(estimates) > 0:\n                results.extend(estimates)\n                while data.get(\"next_page\"):  # type: ignore\n                    next_page = data[\"next_page\"]  # type: ignore\n                    next_url = f\"{url}&next_page={next_page}\"\n                    data = await amake_request(next_url, session=session, **kwargs)\n                    consensus = (\n                        data.get(\"ebitda_consensus\")\n                        if isinstance(data, dict) and \"ebitda_consensus\" in data\n                        else []\n                    )\n                    if consensus:\n                        results.extend(consensus)  # type: ignore","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/intrinio/openbb_intrinio/models/forward_ebitda_estimates.py#L122-L158","documentation":"UnauthorizedError raised in the fetch_callback of the bulk (no-symbol) path of IntrinioForwardEbitdaEstimatesFetcher: the response JSON has an 'error' key and its 'message' contains 'api key', i.e. Intrinio rejected the credential on the ebitda-consensus endpoint.","triggerScenarios":"Calling forward EBITDA estimates without per-symbol mode using a missing, invalid, expired, or under-privileged intrinio_api_key. Detection is the substring 'api key' in the error message.","commonSituations":"Key not configured in the environment/obb.account; key from a plan without analyst estimates access; rotated key not refreshed; CI without credentials.","solutions":["Set a valid key: obb.account.credentials.intrinio_api_key = '<key>' or the INTRINIO_API_KEY env var","Confirm the key works: curl the endpoint directly with api_key=<key>","Ensure the subscription includes Analyst Estimates / consensus data"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"def intrinio_key_ready() -> bool:\n    return bool(obb.account.credentials.intrinio_api_key)","typeGuard":"from openbb_core.provider.utils.errors import UnauthorizedError","tryCatchPattern":"from openbb_core.provider.utils.errors import UnauthorizedError\n\ntry:\n    res = await obb.equity.estimates.ebitda(provider=\"intrinio\")\nexcept UnauthorizedError as e:\n    raise RuntimeError(\"set a valid intrinio_api_key with estimates access\") from e","preventionTips":["Fail fast at startup if intrinio_api_key is absent","Verify the plan includes analyst-estimates data","Catch UnauthorizedError distinctly from generic OpenBBError"],"tags":["authentication","api-key","intrinio","estimates","credentials"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}