Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

getDataChampion returning 403 #148

Description

@AleTassi

Hi everyone
I'm trying to get the name of a champion from the id. Here's my code

public String getPlayedChampion(Summoner player) {
	
	try {
		CurrentGameInfo game = api.getActiveGameBySummoner(Platform.EUW, player.getId());
		
		CurrentGameParticipant participant = game.getParticipantByParticipantId(player.getId());
		
		Champion champ = api.getDataChampion(Platform.EUW, participant.getChampionId());
		
		return champ.getName();
	} catch (RiotApiException e) {
		log.warn("Error getPlayedChampion: {}", e.getMessage());
		return null;
	}
	
}

but the code always throw an error (403 - Forbidden).
I can't find the endPoint that the library try to call in the Riot Dev Site
How can i get the name of a champion?
Is there another java method/riot endpoint to get the name?
Thank you 😄

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions