Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 429 - Too many requests when trying to launch the project #13

Open
tymakat opened this issue Jan 3, 2025 · 1 comment
Open

Comments

@tymakat
Copy link

tymakat commented Jan 3, 2025

Prerequisites: launch the project for the first time with npm start
Remarks: Using free X API plan (it might be related)

When I launch the project I get the following issue:

Starting process to generate draft...
Fetching sources...
Scraping 21 sources...
Error: Failed to fetch tweets for OpenAIDevs: Too Many Requests
    at C:\Users\tymak\Desktop\Hustle apps\trendFinder\src\services\scrapeSources.ts:69:19
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\tymak\Desktop\Hustle apps\trendFinder\src\services\scrapeSources.ts:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

And even though the requirement of X API token is stated as optional, when I revert to default value of

X_API_BEARER_TOKEN=your_twitter_api_bearer_token_here

It still tries to fetch the tweets and produces 401 Unauthorized error

@nickstokes7
Copy link

You should set X_API_BEARER_TOKEN to blank value, otherwise the app is trying to use "your_twitter_api_bearer_token_here" as your API token and it's rejected by Twitter.

But anyway you won't be able to fetch anything with the free X API plan, it only allows a limited number of posts per month, a paid plan in required to fetch tweets:
https://developer.x.com/en/docs/x-api/rate-limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants