Closed LeeFuuChang closed 1 year ago
Any message at the bottom of the app?
It shows this JSON.
If that destination
in the data body is the same as Post payload, then I think it's supposed to something other than null
(I've looked up LCU help and find destination required.
{
"body" : {
"body" : null,
"clientId" : "nil",
"correlationId" : "1041991786-348",
"destination" : null,
"headers" : {},
"messageId" : "C0E83D71-F0D0-4578-9FBD-0B037F98A04C",
"timeToLive" : 0.0,
"timestamp" : 1692451150479.0
},
"typeName" : "flex.messaging.messages.AcknowledgeMessage"
}
"PostLolLoginV1SessionInvoke": {
"arguments": [
{
"destination": {
"type": "string"
}
},
{
"method": {
"type": "string"
}
},
{
"args": {
"type": "vector of object"
}
}
],
"http_method": "POST",
"url": "/lol-login/v1/session/invoke",
}
I've tried myself by posting through the same url and arguments as in your code.
Here's what I got (though destination
is given, it still says that destination is required)
clicked on 'Dodge' during ChampSelect phase and nothing happened
To me works correctly as it is now
I've tried myself by posting through the same url and arguments as in your code. Here's what I got (though
destination
is given, it still says that destination is required)
I've tried myself by posting through the same url and arguments as in your code. Here's what I got (though
destination
is given, it still says that destination is required)
import requests as rq
import json
import urllib3
urllib3.disable_warnings()
headers = {"Authorization": "Basic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}
baseUrl = "https://127.0.0.1:9955"
print(json.dumps(rq.post(f'{baseUrl}/lol-login/v1/session/invoke?destination=lcdsServiceProxy&method=call&args=["", "teambuilder-draft", "quitV2", ""]', "", verify=False, headers=headers).json(), indent=4))
OK I think there's something wrong on my end and I don't know what it is. I use the same code as you did and still doesn't work. Is there anything known to cause this issue?
Keep in mind that in custom it does not work. Btw, what server are you on?
Keep in mind that in custom it does not work. Btw, what server are you on?
oh... rlly didn't know that I play on Taiwanese server
and one more thing, how can I get that header Basic Auth key
You can get it through KBotExt in the "Custom" tab, clicking on "Custom Port/Header" and then "LCU". In the headers there will also be the "Authorization" header.
Otherwise, there are 2 other methods:
C:\Riot Games\League of Legends\lockfile
the format of this file is the following <Process Name>:<Process ID>:<Port>:<Password>:<Protocol>
The username is always riot
wmic PROCESS WHERE name='LeagueClientUx.exe' GET commandline
.
After doing that you can find the info that you need in the args, like:
--app-port=<port>
is the port, so the url is https://127.0.0.1:<port>
--remoting-auth-token=<password>
is the passwordriot
Once you have this information you can compose your Authorization header:
riot:<password>
In Python you can use
import base64 password = "<password>" print("Basic " + base64.b64encode((f"riot:{password}").encode()).decode())
Getting credentials for the Riot Client works the exact same way:
%LOCALAPPDATA%\Riot Games\Riot Client\Config\lockfile
the format of this file is the following <Process Name>:<Process ID>:<Port>:<Password>:<Protocol>
The username is always riot
PS: For the path in Python you can use
os.path.join(os.getenv("LOCALAPPDATA"), R"Riot Games\Riot Client\Config\lockfile")
wmic PROCESS WHERE name='LeagueClientUx.exe' GET commandline
.
After doing that you can find the info that you need in the args, like:
--riotclient-app-port=<port>
is the port, so the url is https://127.0.0.1:<port>
--riotclient-auth-token=<password>
is the passwordriot
clicked on 'Dodge' during ChampSelect phase and nothing happened