techchrism/valorant-api-docs

403 Forbidden from authorization

Closed this issue · 4 comments

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

Same issue, the status code of the Auth Request is 403. I believe that the problem is in the preparation of cookies for the auth request, since also that request throws an 403 status code. Tho I don't get what is the cause of the failure of the cookie request :(

image

I tested it on: window10 and macos Montrey M1

Same issue, the status code of the Auth Request is 403. I believe that the problem is in the preparation of cookies for the auth request, since also that request throws an 403 status code. Tho I don't get what is the cause of the failure of the cookie request :(

image

I tested it on: window10 and macos Montrey M1

just checkout floxay/python-riot-auth#5

They blocked some old user agent values recently, this issue was already fixed in floxay/python-riot-auth@3fea6a4, use v1.0.1.

Everything is good after I update it,no err occuered by now

Thanks mate, I didn't think of that :))

I'm not very knowledgeable on the subject but from what I understand, Cloudflare does tls fingerprinting which necessitates a specific cipher suite and there are additional user agent checks.
Glad you got everything working 👍