GitHub configuration
Package:sanvex/github · Driver id: github
Auth modes
What to register (GitHub)
API key (simplest)
- GitHub → Settings → Developer settings → Personal access tokens.
- Create a token with scopes your app needs (
repo,read:org, etc.). - Store via CLI (see below) — no OAuth app required.
OAuth2 (multi-user or GitHub App flow in your app)
- GitHub → Settings → Developer settings → OAuth Apps (or GitHub Apps for app installations).
- Set Authorization callback URL to match
GITHUB_REDIRECT_URI. - Note Client ID and Client secret for
.env.
/sanvex/github/login routes — you implement the OAuth UI and store tokens.
Environment variables
PATs are not stored in
.env long-term — use sanvex:setup or programmatic setApiKey().
config/sanvex.php (optional)
Not required for API key setup. Use only if you want OAuth app settings in published config for your own OAuth flow.
Stored credential keys (sv_accounts)
Token resolution:
api_key → bot_token → access_token.
CLI
Built-in Sanvex OAuth routes
None.What the driver reads at runtime
Next: Setup · Resources
