Skip to main content

Importing Games from Riot

intermediateLast updated: 1/15/2024

Step-by-step guide to importing games from Riot's API

Importing Games from Riot

This guide will walk you through importing individual games from Riot's API into the platform.

Prerequisites

Before importing games, make sure:

  1. Your tournament is linked to Riot (has a Riot tournament ID)
  2. The match has been created and games have been pre-created
  3. You have the Riot Game ID (match ID from Riot)
  4. You know the region where the game was played

Step-by-Step Guide

Step 1: Navigate to Match Management

  1. Go to your tournament's admin page
  2. Click on the "Matches" tab
  3. Find the match you want to import a game for

Step 2: Expand the Match

  1. Click the down arrow (▼) button next to the match
  2. You'll see all games for that match listed
  3. Games will show their status:
    • Pending (Yellow): Ready to import
    • Completed (Green): Already imported
    • Skipped (Gray): Not needed

Step 3: Import a Game

  1. Find the game you want to import (must be in "Pending" status)
  2. Click the "Import Game" button next to that game
  3. A modal will appear asking for:
    • Riot Game ID: The match ID from Riot's API
    • Region: The region where the game was played (e.g., NA1, EUW1, KR)

Step 4: Enter Game Information

  1. Riot Game ID:

    • This is the match ID from Riot's API
    • Format: Usually a long string like "NA1_1234567890"
    • You can find this in Riot's match history or API
  2. Region:

    • Select the region from the dropdown
    • Common regions: NA1, EUW1, EUN1, KR, BR1, etc.
    • Make sure this matches where the game was actually played

Step 5: Complete the Import

  1. Click "Import Game Data"

  2. The system will:

    • Fetch game data from Riot's API
    • Update the game record with match results
    • Store participant statistics
    • Update the match score
    • Mark the game as "Completed"
  3. If successful, you'll see a success message

  4. The game status will change to "Completed" (Green)

Understanding Game Import

What Gets Imported

When you import a game, the system fetches and stores:

  • Game Result: Which team won (home or away)
  • Team Kills: Kills for each team
  • Game Duration: How long the game lasted
  • Participant Data:
    • Player statistics (KDA, gold, damage, etc.)
    • Champion picks
    • Items purchased
    • Runes and summoner spells
  • Game Metadata:
    • Game version
    • Map ID
    • Queue type
    • Platform ID

Match Score Updates

After importing a game, the match score is automatically updated:

  • Best of 1: Score shows 1-0 or 0-1
  • Best of 3: Score shows 2-0, 2-1, 1-2, or 0-2
  • Best of 5: Score shows 3-0, 3-1, 3-2, etc.

Auto-Skip Unused Games

If a match completes early (e.g., 2-0 in a Best of 3), remaining games are automatically marked as "Skipped" and cannot be imported.

Finding Riot Game IDs

From Riot Client

  1. Open League of Legends client
  2. Go to Match History
  3. Find the game you want to import
  4. The game ID is in the URL or match details

From Riot API

If you're using Riot's API directly:

  1. Use the Match API endpoint
  2. The game ID is the matchId field in the response
  3. Format: {region}_{matchId}

From Tournament Codes

If you generated tournament codes:

  1. The game should be linked to the tournament code
  2. Riot's callback system can automatically import games
  3. See Riot Callback Integration for details

Troubleshooting

"Game not found" Error

  • Check Riot Game ID: Make sure you entered the correct ID
  • Check Region: Ensure the region matches where the game was played
  • Check API Access: Verify your Riot API key has access to match data

"Game already exists" Error

  • The game may have already been imported
  • Check the game status - it should show "Completed"
  • You can re-import to update data if needed

"Game is skipped" Error

  • The match completed early and this game wasn't needed
  • Skipped games cannot be imported
  • This is normal behavior for matches that end early

Import Fails

  • Check Internet Connection: Make sure you can reach Riot's API
  • Check API Key: Verify your Riot API key is valid
  • Check Game Age: Very old games may not be available
  • Check Region: Make sure the region is correct

Best Practices

  1. Import Promptly: Import games soon after they finish for best results
  2. Verify Data: Check that imported data looks correct
  3. Use Riot Callbacks: Set up webhooks for automatic imports
  4. Keep Track: Monitor which games have been imported
  5. Re-import if Needed: You can re-import games to update data

Next Steps

Tags:game-managementriotimportmatches

Was this article helpful?