Skip to main content

GET_getByRiotId

await client.GET_getByRiotId(gameName, tagLine, cluster=None)
Get an account by Riot ID. The Riot ID is the player’s display name in the format gameName#tagLine.
ParameterTypeDescription
gameNamestrThe game name (left of #)
tagLinestrThe tag line (right of #)
clusterstr, optionalOverrides the default cluster. Valid values: americas, asia, esports, europe
Returns: AccountDto or dict Raises: InvalidCluster, RiotAPIResponseError

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        account = await client.GET_getByRiotId("PlayerName", "NA1")
        print(f"PUUID: {account.puuid}")
        print(f"Riot ID: {account.gameName}#{account.tagLine}")
    finally:
        await client.close()

asyncio.run(main())
This endpoint queries across the entire cluster. Use the cluster closest to the player’s region for best results.