ByteProxy Usage Guide
This guide explains how to use ByteProxy for different service integrations.
Proxy Endpoints
All proxy requests follow this pattern:
http://localhost:3420/proxy/{service}/{endpoint}
Where:
{service}is a configured service (e.g.,discord,github){endpoint}is the API endpoint you want to access
Example Requests
Discord API
# Get current user (requires DISCORD_BOT_TOKEN in .env)
curl http://localhost:3420/proxy/discord/users/@me
# Get guild information
curl http://localhost:3420/proxy/discord/guilds/957420716142252062
GitHub API
# Get user information (requires GITHUB_TOKEN in .env)
curl http://localhost:3420/proxy/github/users/ByteBrushStudios
# Get repository information
curl http://localhost:3420/proxy/github/repos/ByteBrushStudios/Proxy
Authentication
ByteProxy offers two types of authentication:
- Proxy Authentication: Securing access to the proxy itself
- Service Authentication: Managing tokens for third-party APIs
Proxy Authentication
When enabled, all proxy requests require an API key:
# Using Authorization header (preferred)
curl -H "Authorization: Bearer YOUR_API_KEY" http://localhost:3420/proxy/discord/users/@me
# Using x-api-key header
curl -H "x-api-key: YOUR_API_KEY" http://localhost:3420/proxy/discord/users/@me
# Using query parameter (less secure, for testing)
curl "http://localhost:3420/proxy/discord/users/@me?api_key=YOUR_API_KEY"
Configure this in your .env file:
PROXY_API_KEY=your_secure_key_here
REQUIRE_AUTH_FOR_PROXY=true
Service Authentication
ByteProxy automatically adds service authentication tokens from your environment variables:
# For Discord API
DISCORD_BOT_TOKEN=your_discord_bot_token
# For GitHub API
GITHUB_TOKEN=your_github_personal_access_token
Error Handling
ByteProxy provides detailed error messages:
{
"error": "Rate limit exceeded for discord. Reset in 25 seconds.",
"service": "discord",
"path": "/users/@me",
"troubleshooting": {
"hint": "Check /manage/diagnostics for network troubleshooting tips",
"documentation": "/docs"
}
}
Rate Limiting
Each service has configurable rate limits:
GET /proxy/services/discord/rate-limit
Response:
{
"service": "discord",
"remaining": 45,
"resetTime": 1626701234567,
"resetIn": 25
}
Next Steps
- Service Configuration - Configure new services
- Self-Hosting Guide - Deploy ByteProxy
- API Reference - Complete API documentation