So I've been trying valorantpy module that provides an easy way to send requests to get personal player statistics.
This code:
import os
import valorant
KEY = 'key'
client = valorant.Client(KEY, locale="ru-RU", region="eu", route="europe")
account = client.get_user_by_name("SGT ItsRazyHero#VCTRU")
match = account.matchlist().history.find(queueId="competitive")
if match == None:
print("No Ranked match in recent history!")
exit(1)
else:
match = match.get()
for team in match.teams:
print(f"{team.teamId} Team's Ranks: ")
players = match.players.get_all(teamId=team.teamId)
for player in players:
print(f"\t{player.gameName} - {player.rank}")
Checks my latest competitive match and gets information about teammates and their ranks. So I've got trouble.
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://eu.api.riotgames.com/val/match/v1/matchlists/by-puuid/C3NUBHHFqy-JaV_losaGX0s_-q-NszM5VGYyHHV8GhFMVffm9GhknMFaCiY5GxPLdQ6L_cDYUQol9A?locale=ru-RU
And I don't know how to solve this problem. If you follow this link you will get 401 Unauthorized error.