Skip to main content

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:

  1. Game finishes in League of Legends
  2. Riot sends webhook to your server
  3. System receives callback
  4. Game identified by tournament code
  5. Game data fetched and imported
  6. 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:

  1. Access Riot Developer Portal
  2. Navigate to Tournament Codes
  3. Configure webhook URL
  4. Enter your callback endpoint
  5. Save configuration

Step 3: Test Callback

Testing:

  1. Create test game with tournament code
  2. Finish game
  3. Check callback received
  4. Verify game imported
  5. Confirm setup working

Callback Processing

Receiving Callbacks

How System Receives:

  1. Riot sends POST request
  2. System receives at /api/riot-callback
  3. Callback data validated
  4. Game identified
  5. Import process started

Processing Callbacks

Processing Steps:

  1. Validate callback data
  2. Find game by tournament code
  3. Fetch game data from Riot API
  4. Import game data
  5. Update match results
  6. 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
Tags:riot-integrationcallbackswebhooksautomation

Was this article helpful?