Overview
ByteSend API uses Bearer token authentication for all API endpoints. You can generate API keys from your dashboard to authenticate requests.Generating an API Key
Via Dashboard
- Log in to your ByteSend Dashboard
- Navigate to Settings → General
- Scroll to the API Keys section
- Click Generate New API Key
- Give your key a name (e.g., “Development”, “Production”)
- Click Create
- Copy the key immediately — you won’t be able to see it again
- Store it securely (use environment variables, not in version control)
Using Your API Key
In API Requests
Include your API key in theAuthorization header with the Bearer scheme:
In SDK Clients
JavaScript/TypeScript
Python
API Key Management
Viewing Your Keys
- Go to Settings → General
- All active API keys are listed with:
- Key name
- Creation date
- Last used date
- Masked key preview
Rotating Keys
To rotate your API key safely:- Generate a new API key in the dashboard
- Update all applications to use the new key
- Test that everything works correctly
- Delete the old key from the dashboard
Revoking Keys
- Navigate to Settings → General
- Find the key you want to revoke
- Click Revoke
- Confirm the action
- The key will be immediately invalidated
Security Best Practices
Protect Your Keys
- Never commit API keys to version control
- Use environment variables to store sensitive keys
- Use different keys for different environments (development, staging, production)
- Rotate keys regularly (every 90 days recommended)
- Revoke keys immediately if compromised
Environment Variables
Create a.env file (never commit this):
Monitoring Usage
- Check the “Last used” timestamp to identify unused keys
- Monitor your API usage through the dashboard analytics
- Set up alerts for unusual activity
Troubleshooting
”Unauthorized” Error
- Verify the API key is correct and not expired
- Check that the key is included in the
Authorizationheader - Ensure the header format is
Bearer {key}(with a space) - Verify the key hasn’t been revoked
Key Not Working After Generation
- Make sure you copied the entire key
- Check that there are no extra spaces or characters
- Try revoking and generating a new key
Lost or Forgotten Key
If you lose your API key:- You cannot recover the old key
- Generate a new API key from the dashboard
- Update all applications to use the new key
- Revoke the old key (if known)
Rate Limiting
API keys are subject to rate limits:- Free Plan: 100 requests/minute
- BASIC Plan: 1,000 requests/minute
- LIFETIME Plan: 10,000 requests/minute
429 Too Many Requests response.