KebsCS / KBotExt

All-in-one application that sends custom requests to League of Legends LCU api
465 stars 76 forks source link

ChampSelect Dodge not working #169

Closed LeeFuuChang closed 1 year ago

LeeFuuChang commented 1 year ago

clicked on 'Dodge' during ChampSelect phase and nothing happened

KebsCS commented 1 year ago

Any message at the bottom of the app?

LeeFuuChang commented 1 year ago

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",
}
LeeFuuChang commented 1 year ago

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) image

BennyExtreme commented 1 year ago

clicked on 'Dodge' during ChampSelect phase and nothing happened

To me works correctly as it is now

BennyExtreme commented 1 year ago

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) image

image

LeeFuuChang commented 1 year ago

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) image

image

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? image

BennyExtreme commented 1 year ago

Keep in mind that in custom it does not work. Btw, what server are you on?

LeeFuuChang commented 1 year ago

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

BennyExtreme commented 1 year ago

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:

Once you have this information you can compose your Authorization header:

Getting credentials for the Riot Client works the exact same way: