feat: add GitHub token authentication for API rate limit#346
Open
survivor998 wants to merge 2 commits into
Open
feat: add GitHub token authentication for API rate limit#346survivor998 wants to merge 2 commits into
survivor998 wants to merge 2 commits into
Conversation
Add support for a configurable GitHub Personal Access Token to avoid API rate limiting (60 req/hr unauthenticated -> 5,000 req/hr authenticated). - Add github_token field to settings_t struct - Add JSON serialization/deserialization for github_token - Add optional token parameter to util::get_inet_res() - Send Authorization header for all GitHub API requests when token is set - Pass conf.github_token in all 8 GitHub API calls (gui.cpp) Users can add "github_token": "ghp_..." to ytdlp-interface.json Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for a configurable GitHub Personal Access Token to avoid API rate limiting (60/hr unauthenticated -> 5000/hr authenticated).
Changes
github_tokenfield tosettings_tgithub_tokeninto_json()/from_json()tokenparameter toget_inet_res()Authorization: token <TOKEN>header for GitHub API requestsconf.github_tokenin all 8 GitHub API callsUsage
Add to
ytdlp-interface.json:{"github_token": "ghp_your_token_here"}No token scope is needed for public repo access. Fully backward compatible.
🤖 Generated with Claude Code