Overview
The Account endpoints provide access to player identification data, including PUUIDs and Riot IDs. These endpoints are essential for retrieving the unique identifiers needed to query match data.PUUID (Player Universally Unique Identifier) is Riot’s internal identifier for players across all regions. It remains constant even if a player changes their Riot ID.
Get PUUID
Retrieves the current authenticated user’s PUUID and Riot ID from their session.Authentication
Requires valid NextAuth session. Returns current user’s data only.Response
Player’s unique identifier (PUUID)
Player’s Riot ID game name (without tag)
Player’s Riot ID tag line (without # symbol)
Example
Get Riot ID
Fetches Riot ID information (game name and tag line) for a given PUUID from the Riot API.Authentication
Requires valid NextAuth session. Only allows querying the authenticated user’s own PUUID.Query Parameters
Player’s PUUID to look up. Defaults to current user’s PUUID if not provided.
Response
Returns the Riot Account-v1 response fromhttps://americas.api.riotgames.com/riot/account/v1/accounts/by-puuid/{puuid}
Player’s unique identifier
Player’s Riot ID game name
Player’s Riot ID tag line
Example
Understanding PUUIDs
The PUUID is the primary identifier used throughout the Agent LoL API:- Permanent: Unlike summoner names or Riot IDs, PUUIDs never change
- Cross-region: The same PUUID works across all Riot regions
- Required for matches: All match-related endpoints require a PUUID
- Format: Long alphanumeric string with hyphens
Typical Workflow
- Call
/api/riot/account/get-puuidto get the current user’s PUUID - Store the PUUID for subsequent API calls
- Use the PUUID to query match history and game data
- Optionally call
/api/riot/account/get-riotidto display human-readable names
