Skip to main content

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

  1. Go to Riot Developer Portal
  2. Create developer account
  3. Verify email address
  4. Complete registration

Step 2: Create Application

  1. Log in to developer portal
  2. Create new application
  3. Fill in application details
  4. Submit application
  5. Wait for approval

Step 3: Get API Key

  1. Navigate to application
  2. Find API key section
  3. Generate API key
  4. Copy API key
  5. Store securely

Configuring API Key

Step 1: Access System Settings

  1. Go to admin dashboard
  2. Navigate to "Settings" or "System Settings"
  3. Find "Riot API" section

Step 2: Enter API Key

  1. Find "Riot API Key" field
  2. Paste your API key
  3. Verify key is correct
  4. Save settings

Step 3: Test Connection

  1. Click "Test Connection" if available
  2. Verify API connection works
  3. Check for errors
  4. 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:

  1. Use Riot API to create provider
  2. Store provider ID
  3. 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:

  1. Create tournament in Riot system
  2. Get tournament ID
  3. 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:

  1. Set default region in settings
  2. Configure per tournament
  3. Match region to tournament region
  4. Verify region is correct

Testing API Access

Test API Connection

How to Test:

  1. Use test endpoint
  2. Verify API key works
  3. Check response
  4. 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
Tags:riot-integrationapisetupconfiguration

Was this article helpful?