Closed mariotroopa closed 4 years ago
Hi,
You have to provide a valid token in the AuthenticationInfo structure. If you don't send a token to the server or if the token is invalid the server returns Authentication::ValidationFailed. At the moment, a man-in-the-middle is the easiest way to obtain a token. Do you know how to do that?
You should look for the following request with your man-in-the-middle: https://e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com/1.0.0/application/token
.
Once you have a token, you can set up the AuthenticationInfo as follows:
auth_info = authentication.AuthenticationInfo()
auth_info.token = TOKEN
auth_info.ngs_version = 4
auth_info.token_type = 2
auth_info.server_version = 0
The token is valid for three hours. When it's expired, you have to get a new token.
At some point, NintendoClients might be able to request a token itself. However, at the moment I'm still researching how exactly this is done by the Switch.
Anway, I hope this helps.
Actually I'm not familiar with Nintendo APIs.
According to this Doc, I found session token
, service token
and webApiServerCredential["accesstoken"]
(Authentication Steps 2,3,4) with Telerik Fiddler on iOS Swich Online App.
Which token is correct? Or another one?
what is USERNAME ? I think it is Email address or something in the response of (v1 / Account / Login).
And I haven't found https://e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com/1.0.0/application/token
on Switch Online App yet.
I'm sorry for your inconvenience.Thank you for your cooperation.
The Switch Online App is unrelated to this. You have to set up a man-in-the-middle on your real Nintendo Switch console.
USERNAME
is supposed to be your user id in decimal form. I think you can find it in https://e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com/1.0.0/login
.
exefs_patches is probably the easiest way to set up a MITM on your Switch, but I can't really help you with it because I haven't used it myself yet.
Actually, I think I was wrong about /1.0.0/application/token
. I think you have to look at /1.0.0/login
for the NEX token as well.
I confirmed exefs_patches
and it will not work alone.
Need to generate Client Certificate from dumped data. CertNXtractionPack
Set generated certificate to proxy's Client Certificate .
It was explained at simon'n discord. I try it,and report when results are available
It seems that it will take more time to acquire tokens due to switch version upgrade, but it seems that I can create certificate and mitm with it. Actually, Original CertNXtranctionPackworked well with Charles Proxy(ver3.x.x).
One question is, how do you get a token if you are not using exefs_patches
?
I actually never got a token myself. Instead, I tested my client with the guest account when it still existed. The only way to get a token without mitm would be to request one with a custom client. However, I'm still trying to figure out how everything works (aauth is quite complicated).
Hi again, I uploaded an example script that downloads a SMM2 level from the server. You'll have to dump a few things from your Switch to run it (keys, prodinfo and ticket files), but once you have the required files you won't have to touch your Switch anymore to use the script.
I want to get smm2 stage information, but there are no examples to get information from the server with switch platform.
I test
example_mariokartdeluxe.py
with login.and say
nintendo.nex.common.RMCError: Authentication::ValidationFailed (0x80680007)
What do i need to do?
Thank you for your reply.