DIYgod/RSSHub · error · ConfigNotFoundError

YouTube RSS is disabled due to the lack of <a href="https://

Error message

YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>

What it means

ConfigNotFoundError thrown by the YouTube custom-URL handler when config.youtube is falsy or config.youtube.key is empty. The route resolves a /c/<slug> URL to a channel id via scraping, but the downstream pipeline still needs a YouTube Data API key, so the handler refuses to start without one. The message links to the route-specific config docs.

Source

Thrown at lib/routes/youtube/custom.ts:43

        antiCrawler: false,
        supportBT: false,
        supportPodcast: false,
        supportScihub: false,
    },
    radar: [
        {
            source: ['www.youtube.com/c/:id'],
            target: '/c/:id',
        },
    ],
    name: 'Custom URL',
    maintainers: ['TonyRL'],
    handler,
};

async function handler(ctx) {
    if (!config.youtube || !config.youtube.key) {
        throw new ConfigNotFoundError('YouTube RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
    }
    const username = ctx.req.param('username');
    const embed = !ctx.req.param('embed');

    const { data: response } = await got(`https://www.youtube.com/c/${username}`);
    const $ = load(response);
    const ytInitialData = JSON.parse(
        $('script')
            .text()
            .match(/ytInitialData = (\{.*?\});/)?.[1] || '{}'
    );
    const externalId = ytInitialData.metadata.channelMetadataRenderer.externalId;
    const playlistId = (await getChannelWithId(externalId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads;

    const data = (await getPlaylistItems(playlistId, 'snippet', cache)).data.items;

    return {
        title: `${username} - YouTube`,

View on GitHub (pinned to bed535e087)

Solutions

  1. Create a YouTube Data API v3 key in Google Cloud Console and set YOUTUBE_KEY (comma-separated for multiple keys).
  2. Restart RSSHub so config picks up the new env var.
  3. If you cannot obtain a key, use a route that does not require it (e.g. the youtubei-backed /youtube/user/:id).
Defensive patterns

Strategy: validation

Validate before calling

import { config } from '@/config';
function requireYouTubeKey() {
    if (!config.youtube || !config.youtube.key) {
        throw new ConfigNotFoundError('Set the YOUTUBE_KEY env var to a YouTube Data API v3 key. See https://docs.rsshub.app/deploy/config#route-specific-configurations');
    }
}

Prevention

When it happens

Trigger: Any request to /youtube/c/:username when YOUTUBE_KEY is not configured on the RSSHub instance. The guard `if (!config.youtube || !config.youtube.key)` fires at the top of the handler before any network call.

Common situations: Self-hosted RSSHub without a Google API key; the operator wants only the no-key youtubei routes but tried a /c/ route that still gates on the key; key env var typo'd as YOUTUBE_KEYS or similar.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/ed7d7b09bfe50d59. Report an issue: GitHub.