DIYgod/RSSHub · error · ConfigNotFoundError
Twitter RSS is disabled due to the lack of <a href="https://
Error message
Twitter 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 Twitter Trends route handler when config.twitter is missing or lacks consumerKey/consumerSecret. Unlike the web-api routes (which use auth tokens), the trends route uses the legacy v1.1 API via getAppClient(), which requires OAuth 1.0a application credentials. RSSHub surfaces this as a config error with a link to the deploy docs.
Source
Thrown at lib/routes/twitter/trends.ts:27
categories: ['social-media'],
example: '/twitter/trends/23424856',
parameters: { woeid: 'Yahoo! Where On Earth ID. default to woeid=1 (World Wide)' },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
},
name: 'Trends',
maintainers: ['sakamossan'],
handler,
};
async function handler(ctx) {
if (!config.twitter || !config.twitter.consumerKey || !config.twitter.consumerSecret) {
throw new ConfigNotFoundError('Twitter RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
}
const woeid = ctx.req.param('woeid') ?? 1; // Global information is available by using 1 as the WOEID
const client = await getAppClient();
const data = await client.v1.get('trends/place.json', { id: woeid });
const [{ trends }] = data;
return {
title: `Twitter Trends on ${data[0].locations[0].name}`,
link: 'https://x.com/i/trends',
item: trends
.filter((t) => !t.promoted_content)
.map((t) => ({
title: t.name,
link: t.url,
description: t.name + (t.tweet_volume ? ` (${t.tweet_volume})` : ''),
})),
};
}View on GitHub (pinned to bed535e087)
Solutions
- Create a Twitter Developer app and obtain API Key + API Key Secret.
- Set TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET in the RSSHub environment.
- Restart RSSHub.
- If you cannot get developer credentials, disable the /twitter/trends route or do not request it.
Example fix
// before // TWITTER_CONSUMER_KEY= // TWITTER_CONSUMER_SECRET= // after // TWITTER_CONSUMER_KEY=yourApiKey // TWITTER_CONSUMER_SECRET=yourApiSecret
Defensive patterns
Strategy: validation
Validate before calling
function trendsConfigured(cfg: any): boolean {
return Boolean(cfg?.twitter?.consumerKey && cfg?.twitter?.consumerSecret);
}
if (!trendsConfigured(config)) { /* hide / disable the /twitter/trends route */ } Try / catch
try { await fetchRss('/twitter/trends/1'); }
catch (e) {
if (/disabled due to the lack/.test(String(e))) { /* skip this feed, credentials missing */ }
else throw e;
} Prevention
- Set TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET before exposing the trends route.
- Use a dedicated read-only Twitter developer app for these credentials.
- Rotate credentials before they expire and restart RSSHub after each change.
When it happens
Trigger: Requesting /twitter/trends/:woeid? on an instance where TWITTER_CONSUMER_KEY or TWITTER_CONSUMER_SECRET are not set. The check is the very first statement of the handler, so any request to the trends route without these env vars fails immediately.
Common situations: Instance admin enabled general Twitter routes via auth tokens but did not obtain a Twitter developer app for consumer key/secret; env vars renamed or dropped during deploy; Twitter developer app credentials revoked.
Related errors
- No valid Twitter token found
- Twitter API is not configured
- Discord RSS is disabled due to the lack of <a href="https://
- Discord RSS is disabled due to the lack of authorization con
- Discord RSS is disabled due to the lack of authorization con
AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12).
Data as JSON: /api/errors/a8c8a56ddc495836.
Report an issue: GitHub.