Skip to content

Getting Riot IDs and unencrypted ids

dysolix edited this page Apr 18, 2024 · 2 revisions

Many endpoints require puuids or summoner ids. You can't use ids returned by the Riot API since they are encrypted. To get the unencrypted ids and Riot ID of the local summoner see Getting information about the local summoner.

Getting an unencrypted puuid by Riot ID

Returns the summoner's puuid.

const summoner = await client.request("get", "/lol-summoner/v1/alias/lookup", {
    query: {
        gameName: "dysolix",
        tagLine: "420"
    }
});

Getting a summoner by PUUID or summoner id

Both endpoints return the same data. It included the summoner id, puuid and Riot ID.

const summoner = await client.request("get", "/lol-summoner/v1/summoners/{id}", { 
    path: { id: "..." } // Unencrypted summoner id
});

const summoner2 = await client.request("get", "/lol-summoner/v2/summoners/puuid/{puuid}", { 
    path: { puuid: "..." } // Unencrypted puuid
});