Riot API Setup
advancedLast updated: 1/15/2024
Set up Riot API access and configure API keys for tournament code generation
Riot API Setup
Set up Riot API access and configure API keys to enable tournament code generation and game data import.
Riot API Overview
Riot API provides:
- Tournament Codes: Generate codes for tournament games
- Game Data: Import game results and statistics
- Player Data: Fetch player ranks and information
- Account Verification: Verify Riot accounts
Prerequisites
Required Accounts
- Riot Developer Account: Riot Games developer account
- API Key: Valid Riot API key
- Provider ID: Riot provider ID (for tournament codes)
- Tournament ID: Riot tournament ID (for tournament codes)
Required Access
- Admin Access: Admin access to platform
- System Settings: Access to system settings
- Riot Developer Portal: Access to Riot developer portal
Getting Riot API Access
Step 1: Create Riot Developer Account
- Go to Riot Developer Portal
- Create developer account
- Verify email address
- Complete registration
Step 2: Create Application
- Log in to developer portal
- Create new application
- Fill in application details
- Submit application
- Wait for approval
Step 3: Get API Key
- Navigate to application
- Find API key section
- Generate API key
- Copy API key
- Store securely
Configuring API Key
Step 1: Access System Settings
- Go to admin dashboard
- Navigate to "Settings" or "System Settings"
- Find "Riot API" section
Step 2: Enter API Key
- Find "Riot API Key" field
- Paste your API key
- Verify key is correct
- Save settings
Step 3: Test Connection
- Click "Test Connection" if available
- Verify API connection works
- Check for errors
- Confirm setup successful
Provider and Tournament IDs
Getting Provider ID
What is Provider ID:
- Unique identifier for your organization
- Required for tournament code generation
- Created through Riot API
How to Get:
- Use Riot API to create provider
- Store provider ID
- Configure in system settings
Getting Tournament ID
What is Tournament ID:
- Unique identifier for tournament
- Links platform tournament to Riot tournament
- Required for tournament codes
How to Get:
- Create tournament in Riot system
- Get tournament ID
- Configure per tournament
Environment Variables
API Key Storage
Recommended Storage:
- Store in environment variables
- Never commit to version control
- Use secure storage
- Rotate keys regularly
Configuration
Environment Variables:
RIOT_API_KEY=your_api_key_here
RIOT_CLIENT_ID=your_client_id
RIOT_CLIENT_SECRET=your_client_secret
API Rate Limits
Understanding Limits
Rate Limits:
- API has rate limits
- Different limits per endpoint
- Limits vary by region
- Monitor usage
Managing Limits
Best Practices:
- Cache API responses
- Batch requests when possible
- Monitor rate limit usage
- Handle rate limit errors
- Use webhooks when available
API Regions
Supported Regions
Available Regions:
- NA (North America)
- EUW (Europe West)
- EUNE (Europe Nordic & East)
- KR (Korea)
- BR (Brazil)
- LAN (Latin America North)
- LAS (Latin America South)
- OCE (Oceania)
- RU (Russia)
- TR (Turkey)
- JP (Japan)
Region Configuration
How to Configure:
- Set default region in settings
- Configure per tournament
- Match region to tournament region
- Verify region is correct
Testing API Access
Test API Connection
How to Test:
- Use test endpoint
- Verify API key works
- Check response
- Confirm access
Common Tests
Test Scenarios:
- Test API key validity
- Test provider creation
- Test tournament creation
- Test code generation
- Test game data fetch
Troubleshooting
"API key invalid"
Problem: API key not working
Solutions:
- Verify key is correct
- Check key hasn't expired
- Verify key has correct permissions
- Regenerate key if needed
- Check API status
"Rate limit exceeded"
Problem: Too many API requests
Solutions:
- Wait for rate limit reset
- Reduce request frequency
- Cache responses
- Use webhooks instead
- Monitor usage
"Provider not found"
Problem: Provider ID not working
Solutions:
- Verify provider ID is correct
- Check provider exists
- Verify provider is active
- Recreate provider if needed
- Check API access
Best Practices
Security
- Secure Storage: Store keys securely
- Never Commit: Never commit keys to version control
- Rotate Keys: Rotate keys regularly
- Monitor Access: Monitor API access
- Limit Exposure: Limit who has access to keys
Performance
- Cache Responses: Cache API responses
- Batch Requests: Batch requests when possible
- Monitor Usage: Monitor API usage
- Optimize Calls: Optimize API calls
- Use Webhooks: Use webhooks when available
Related Articles
Tags:riot-integrationapisetupconfiguration