getMatchByTournamentCode requires Tournament API key
Closed this issue · 4 comments
getMatchByTournamentCode
methode is always returning LeagueAPI: Forbidden
for me. The method is using the default LeagueAPI::SET_KEY
. When I change my API Key to the tournament API, it works.
Think it should be using the LeagueAPI::SET_TOURNAMENT_KEY
instead for this methode.
You are right of course, thanks for the notice! Should be fixed on master
.
Pulled master
. Sadly, it's still not working. Somehow it's still using LeagueAPI::SET_KEY
. Other Tournament endpoints doesn't work either like getTournamentCodeData
$api = new LeagueAPI([
LeagueAPI::SET_KEY => $apiKey,
LeagueAPI::SET_TOURNAMENT_KEY => $tournamentApikey,
LeagueAPI::SET_REGION => Region::EUROPE_WEST,
LeagueAPI::SET_INTERIM => false,
]);
$matchdata = $api->getMatchByTournamentCode($matchId, $tournamentCode);
You do have your API key approved for Tournament endpoints by Riot, right?
Yes, I was able to create Tournamentcodes (in Riot Dev Portal) and used it to run a testgame.
I also get a success response for getMatchByTournamentCode
and getTournamentCodeData
when I use the Tournament API key for LeagueAPI::SET_KEY
$api = new LeagueAPI([
LeagueAPI::SET_KEY => $tournamentApikey,
LeagueAPI::SET_TOURNAMENT_KEY => $tournamentApikey,
LeagueAPI::SET_REGION => Region::EUROPE_WEST,
LeagueAPI::SET_INTERIM => false,
]);