floxay / python-riot-auth

A Python 3 library to get various Riot tokens and get around Cloudflare's filter during auth.
MIT License
71 stars 14 forks source link

403 Forbidden from authorization #5

Closed musnows closed 2 years ago

musnows commented 2 years ago

I encountered the following error

Traceback (most recent call last):
  File "E:\GIT\Kook-Valorant-Bot\code\main.py", line 1760, in login_authtoken
    res_auth = await authflow(user, passwd)
  File "E:\GIT\Kook-Valorant-Bot\code\val.py", line 152, in authflow
    await auth.authorize(*CREDS)
  File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\riot_auth\auth.py", line 192, in authorize
    async with session.post(
  File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client.py", line 640, in _request
    resp.raise_for_status()
  File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

It occured both on windows11 and cloud_server CentOS7.6

first err occured at 2022-09-27 00:02:47 GMT+8, everything was good on 09-26

image

I asked another developer, who said he had encountered the same error

For the recorded, I also open the same issue at techchrism/valorant-api-docs/issues/13

floxay commented 2 years ago

They blocked some old user agent values recently, this issue was already fixed in https://github.com/floxay/python-riot-auth/commit/3fea6a47930391c129a8e3da6d6d50e5d4e7c138, use v1.0.1.

musnows commented 2 years ago

They blocked some old user agent values recently, this issue was already fixed in 3fea6a4, use v1.0.1.

sorry for didn't see the new ver of repo,everything is good now! image thanks a lot for such a fast fix