NintendoSwitchRESTAPI icon indicating copy to clipboard operation
NintendoSwitchRESTAPI copied to clipboard

Error while getting session token

Open luym11 opened this issue 4 years ago • 2 comments

While trying to obtain a session token, it returns:

UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"error":"invalid_request","error_description":"The provided session_token_code is invalid"}

However, I think I correctly obtained Client ID, Login Page Token Code and Login Page Token Code Verifier already, and filled them in the correct places.

Maybe Nintendo changed their APIs? But I did not find any information about that.

luym11 avatar May 01 '21 18:05 luym11

I'm having the same issue. I'm following the instructions with curl commands:

curl -X POST https://accounts.nintendo.com/connect/1.0.0/api/session_token 
             -H "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60" 
             -d "client_id=71b963c1b7b6d119"
             -d "session_token_code=XXXXXXXXXXXXXX"
             -d "session_token_code_verifier=YYYY"

I'm breaking my head trying to find a solution, but there is nothing documented through the web, or I can't find it.

alessbarb avatar Jan 27 '22 19:01 alessbarb

My logic/code in https://github.com/frozenpandaman/splatnet2statink/blob/master/iksm.py should always be up-to-date.

frozenpandaman avatar Aug 27 '22 00:08 frozenpandaman