I want to understand how a Riot ID can be used to look up an account and, if possible, the other players in its current game. Is this also related to the random friend requests that can lead to scams?
How do I use the Riot API to find players in a current game?
Answers
Start by creating an account on the Riot Developer Portal and generating an API key. The account lookup endpoint takes a Riot ID split into gameName and tagLine, and returns the account's PUUID. Use the regional base URL appropriate to the account, as described in Riot's API documentation.
That gives you the identifier for one account, not a list of everyone in a game. From there, check the current spectator API documentation for the applicable endpoint, routing and access requirements. The account lookup step alone doesn't establish how to retrieve the full player list.
Reply to this answer
For the scam side, an unexpected request from a new account can be a prompt to move the conversation elsewhere and buy something fake. You don't need to engage or follow links to investigate it. Declining the request and using the in-game reporting tools is the safer option.
That pattern doesn't prove how any particular account found you, though. An API lookup is one possible topic to investigate, not evidence about a specific request.
Reply to this answer
Keep the API key private while experimenting. The documented lookup accepts it as an api_key query parameter, but be careful not to share a complete request URL containing your key when asking for help.
Reply to this answer
Add your answer
Answers are reviewed before publication.
P1fuzzyJump_5V:
Got it. So the PUUID is the starting point, rather than the game roster itself.