floxay / python-riot-auth Goto Github PK
View Code? Open in Web Editor NEWA Python 3 library to get various Riot tokens and get around Cloudflare's filter during auth.
License: MIT License
A Python 3 library to get various Riot tokens and get around Cloudflare's filter during auth.
License: MIT License
I am trying to acces lol cap service using ur auth but ssl seems to not be valid for this service
"https://eun1.cap.riotgames.com/lolinventoryservice/v2/inventories/simple?inventoryTypes=CHAMPION&language=en_US"
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host eun1.cap.riotgames.com:443 ssl:default [[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1129)]
Do you know by any chance how to fix it? @floxay
Is this something we could have?
Hello, good project, I have a small problem, for some reason when I authenticate it returns the Post:
{"type":"error","error":"invalid_session_id","country":"co"}
Any idea what field I'm missing from the body?
body = { "acr_values": "", "claims": "", "client_id": "riot-client", "code_challenge": "", "code_challenge_method": "", "nonce": token_urlsafe(16), "redirect_uri": "http://localhost/redirect", "response_type": "token id_token", "scope": "openid link ban lol_region account", }
Hi, it gives 403 Forbidden error. I'm using latest Riot Client user agent also tried with different IP's still same error.
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')]
I get this error when trying to run await auth.authorize(*CREDS)
import riot_auth
ModuleNotFoundError: No module named 'riot_auth' what can i do? i try pip install riot_auth but i got this error "ERROR: Could not find a version that satisfies the requirement riot_auth (from versions: none)
ERROR: No matching distribution found for riot_auth"
i want a way to use proxies in this code.
I am getting the 403 error while hosting..
%Ignoring exception in command login:
#Traceback (most recent call last):
` File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 126, in wrapped
ret = await coro(arg)
` File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 852, in _invoke
1 await self.callback(self.cog, ctx, **kwargs)
U File "/home/user_556182600524234793/commands/commands/login.py", line 32, in login
: userData = await username_to_data(username, password)
i File "/home/user_556182600524234793/commands/commands/utils/shopData.py", line 19, in username_to_data
! await auth.authorize(*CREDS)
[ File "/usr/local/lib/python3.10/site-packages/riot_auth/auth.py", line 192, in authorize
async with session.post(
] File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
" self._resp = await self._coro
Z File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 640, in _request
resp.raise_for_status()
j File "/usr/local/lib/python3.10/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')
EThe above exception was the direct cause of the following exception:
#Traceback (most recent call last):
i File "/usr/local/lib/python3.10/site-packages/discord/bot.py", line 993, in invoke_application_command
" await ctx.command.invoke(ctx)
_ File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 357, in invoke
await injected(ctx)
` File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 134, in wrapped
6 raise ApplicationCommandInvokeError(exc) from exc
�discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')
The auth gives error when the account have 2fa enabled!
D:\project2\python-riot-auth-main\python-riot-auth-main\examples>python example_auth_argv.py "username" "password"
Traceback (most recent call last):
File "D:\project2\python-riot-auth-main\python-riot-auth-main\examples\example_auth_argv.py", line 19, in
asyncio.run(auth.authorize(*CREDS))
File "D:\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\riot_auth\auth.py", line 217, in authorize
async with session.put(
File "D:\Python311\Lib\site-packages\aiohttp\client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\aiohttp\client.py", line 643, in _request
resp.raise_for_status()
File "D:\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')
Hello. I do PUT account.riotgames.com/api/account/v1/user/password however the api returns me 403 Unauthorized. Tell me, please, how to make request with token?
import riot_auth
async def authflow(user: str, passwd: str):
CREDS = user, passwd
auth = riot_auth.RiotAuth()
await auth.authorize(*CREDS)
await auth.reauthorize()
# Reauth using cookies. Returns a bool indicating whether the reauth attempt was successful.
await auth.reauthorize()
# print(f"Access Token Type: {auth.token_type}\n")
# print(f"Access Token: {auth.access_token}\n")
# print(f"Entitlements Token: {auth.entitlements_token}\n")
# print(f"User ID: {auth.user_id}")
return auth
python3 vesion 3.9.5
error handling command: login
Traceback (most recent call last):
File "/home/muxue/kook/bot/lib/python3.9/site-packages/khl/command/command.py", line 87, in handle
await self.execute(msg, *args)
File "/home/muxue/kook/bot/lib/python3.9/site-packages/khl/command/command.py", line 119, in execute
await self.handler(*args)
File "/home/muxue/kook/val_bot/code/main.py", line 731, in login_authtoekn
res_auth = await authflow(user, passwd)
File "/home/muxue/kook/val_bot/code/val.py", line 196, in authflow
auth = riot_auth.RiotAuth()
File "/home/muxue/kook/bot/lib/python3.9/site-packages/riot_auth/auth.py", line 78, in __init__
self._auth_ssl_ctx = RiotAuth.create_riot_auth_ssl_ctx()
File "/home/muxue/kook/bot/lib/python3.9/site-packages/riot_auth/auth.py", line 110, in create_riot_auth_ssl_ctx
libssl.SSL_CTX_set_ciphersuites(ssl_ctx_addr, RiotAuth.CIPHERS13.encode())
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
func = self.__getitem__(name)
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/python3/lib/python3.9/lib-dynload/_ssl.cpython-39-x86_64-linux-gnu.so: undefined symbol: SSL_CTX_set_ciphersuites
Someone told me this is a Path problem, or SSL library version does not correspond. How can I fix that?
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
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
I used it the first time, and when I used it the second time I still got this error. How to fix this error? Thank you
bypass Failure cf update
https://auth.riotgames.com/api/v1/authorization/
Authorization fails
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.