Riot Callbacks
advancedLast updated: 1/15/2024
Set up Riot webhooks for automatic game import when games finish
Riot Callbacks
Set up Riot webhooks to automatically import games when they finish, eliminating the need for manual imports.
Callback Overview
Riot callbacks (webhooks) provide:
- Automatic Notification: Riot notifies when game finishes
- Automatic Import: System imports game automatically
- Real-Time Updates: Updates happen immediately
- No Manual Work: No need to manually import
How Callbacks Work
Callback Flow
Process:
- Game finishes in League of Legends
- Riot sends webhook to your server
- System receives callback
- Game identified by tournament code
- Game data fetched and imported
- Match updated automatically
Callback Data
What Riot Sends:
- Game ID
- Tournament code
- Region
- Start time
- Game mode
- Game type
Setting Up Callbacks
Step 1: Configure Callback URL
Your Callback Endpoint:
https://yourdomain.com/api/riot-callback
Requirements:
- Must be publicly accessible
- Must accept POST requests
- Must return 200 OK response
- Must be HTTPS (production)
Step 2: Register with Riot
How to Register:
- Access Riot Developer Portal
- Navigate to Tournament Codes
- Configure webhook URL
- Enter your callback endpoint
- Save configuration
Step 3: Test Callback
Testing:
- Create test game with tournament code
- Finish game
- Check callback received
- Verify game imported
- Confirm setup working
Callback Processing
Receiving Callbacks
How System Receives:
- Riot sends POST request
- System receives at
/api/riot-callback - Callback data validated
- Game identified
- Import process started
Processing Callbacks
Processing Steps:
- Validate callback data
- Find game by tournament code
- Fetch game data from Riot API
- Import game data
- Update match results
- Return success response
Callback Configuration
Tournament Setup
Required Configuration:
- Tournament linked to Riot tournament
- Tournament codes generated
- Callback URL configured
- API access working
System Configuration
System Requirements:
- Callback endpoint accessible
- API key configured
- Database access
- Error handling
Troubleshooting
"Callbacks not received"
Problem: Callbacks not being received
Solutions:
- Verify callback URL is correct
- Check URL is publicly accessible
- Verify HTTPS is used (production)
- Check server logs
- Test callback endpoint
- Verify Riot configuration
"Callback received but import failed"
Problem: Callback received but game not imported
Solutions:
- Check callback data
- Verify game ID is valid
- Check API access
- Review import logs
- Check for errors
- Try manual import
"Duplicate imports"
Problem: Games imported multiple times
Solutions:
- Check import status before importing
- Verify game not already imported
- Check callback processing
- Review duplicate detection
- Fix if needed
Best Practices
Setup
- Test Thoroughly: Test callbacks thoroughly
- Monitor Logs: Monitor callback logs
- Have Backup: Have manual import as backup
- Document Setup: Document callback setup
Monitoring
- Monitor Callbacks: Monitor callback reception
- Check Imports: Verify imports are working
- Review Errors: Review any errors
- Update Configuration: Update as needed
Related Articles
Tags:riot-integrationcallbackswebhooksautomation