kinnay / NintendoClients

Python package to communicate with Switch, Wii U and 3DS servers
MIT License
537 stars 63 forks source link

Is there a time limit on nex_token/access_token - Wii U #97

Closed TheCryptan closed 1 year ago

TheCryptan commented 1 year ago

Setting up an API for Mario Maker 1 via the Wii U. Is there limit on the access_token/nex_token that's generated at auth? If so any idea what it is? Thanks!

kinnay commented 1 year ago

The access token for https://account.nintendo.net is valid for one hour. If you want to be sure, check the expiration time that is returned by the server. It is measured in seconds.

I have no idea about the NEX token. Actually I still don't understand what the token is even used for, because it is possible to log in without token on NEX servers. Your username (pid) and password and the host and port of the game server never change, so if you get those once you can bypass the account server completely the next time you log in on a NEX server.

TheCryptan commented 1 year ago

Thank you!!

jonbarrow commented 1 year ago

I have no idea about the NEX token. Actually I still don't understand what the token is even used for, because it is possible to log in without token on NEX servers. Your username (pid) and password and the host and port of the game server never change, so if you get those once you can bypass the account server completely the next time you log in on a NEX server.

The NEX token is used during account registration, presumably

When you create a new NNID, an associated NEX account is not automatically created. During your first connection to the friends server you login as the guest user and call AccountManagement::NintendoCreateAccount with the token in the oAuthData DataHolder