Skip to content

feat: add GitHub token authentication for API rate limit#346

Open
survivor998 wants to merge 2 commits into
ErrorFlynn:mainfrom
survivor998:feat/github-token-auth
Open

feat: add GitHub token authentication for API rate limit#346
survivor998 wants to merge 2 commits into
ErrorFlynn:mainfrom
survivor998:feat/github-token-auth

Conversation

@survivor998

Copy link
Copy Markdown

Add support for a configurable GitHub Personal Access Token to avoid API rate limiting (60/hr unauthenticated -> 5000/hr authenticated).

Changes

  • types.hpp: Add github_token field to settings_t
  • types.cpp: Serialize/deserialize github_token in to_json()/from_json()
  • util.hpp: Add optional token parameter to get_inet_res()
  • util.cpp: Send Authorization: token <TOKEN> header for GitHub API requests
  • gui.cpp: Pass conf.github_token in all 8 GitHub API calls

Usage

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

survivor998 and others added 2 commits June 9, 2026 06:41
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>
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

Successfully merging this pull request may close these issues.

1 participant