Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

403 Error! #28

Closed
ndzin opened this issue Aug 10, 2024 · 1 comment
Closed

403 Error! #28

ndzin opened this issue Aug 10, 2024 · 1 comment

Comments

@ndzin
Copy link

ndzin commented Aug 10, 2024

I use the code from this repo for my discord bot that fetches my VALORANT Item Shop for me when it updates and also other features.

The thing is, after some time using it it started returning 403 every single time, and I just cant use it now. Perhaps is there a temporary fix around it or is it because of my IP address using it too much?

aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

Here's how my code has been written:

class Riot:
    def __init__(self, FS, region) -> None:
        self.fs = FS
        self.session = requests.Session()
        self.auth = riot_auth.RiotAuth()
        self.region = region.upper()
        self._initialize()

    
    
    def _initialize(self) -> None:
        self.base_endpoint = self.fs.config['riot']['base_urls']['base_endpoint'][self.region]

        self.session.headers['X-Riot-ClientPlatform'] = base64.b64encode(json.dumps(self.fs.config['riot']['headers']['client_platform']).encode())
        self.session.headers['X-Riot-ClientVersion'] = base64.b64encode(self.fs.config['riot']['headers']['client_version'].encode())       
@floxay floxay closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2024
@floxay floxay reopened this Aug 13, 2024
@floxay
Copy link
Owner

floxay commented Aug 13, 2024

Should be fixed with v1.0.7 (until Rito breaks it again.)

@floxay floxay closed this as completed Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants