- splatnet3_scraper.auth.NSO.g_token_generation_phase_1(id_token, user_info, na_id, f_token_url)
First phase of the
gtokengeneration process.This is the first phase of the
gtokengeneration process. This is abstracted away into a separate method to allow the request to be retried once in the event of a failure. This phase involves two steps: first, theid_tokenis sent to thef_token_urlin a request to obtain thef_token, which is aHMACnecessary to obtain thegtoken. The response contains three values: thef_token, therequest_id, and thetimestamp. These values are then sent to Nintendo’s servers along with theid_tokento obtain thegtoken.- Parameters:¶
- id_token : str¶
ID token from user access token response. This is obtained from the user access token response, and is used to identify the user to Nintendo’s servers. However, this cannot be used to identify the user by a third party by itself.
- user_info : dict[str, str]¶
The dictionary of user info returned by
get_user_info. This must contain the keyslanguage,birthday, andcountry.- na_id : str¶
The Nintendo Account ID of the user. As of version 2.5.1, this is not used for anything. However, it is still required to futureproof in case Nintendo decides to enforce verification of this value.
- f_token_url : str¶
URL to use for f token generation. This package provides a default URL, but you can provide your own. The default URL is provided by imink.
- Returns:¶
str – The Web Service Credential Access Token.
str – The Coral user ID.