-
splatnet3_scraper.auth.NSO.get_ftoken(f_token_url, id_token, step, na_id, coral_user_id=
None) Given the
f_token_url,id_token, andstep, returns thef_token,request_id, andtimestampfrom the response.Note that this is a third party method, and is not officially sanctioned by Nintendo. The default ftoken generation URL used by this library is provided by imink. In the interest of transparency, the following is the entirety of the request header sent to the ftoken generation URL:
>>> { ... "User-Agent": f"splatnet3_scraper/{__version__}", ... "Content-Type": "application/json; charset=utf-8", ... }The following is the entirety of the request body sent to the ftoken generation URL:
>>> { ... "token": id_token, ... "hash_method": step, ... }As you can see, the only identifying information sent to the ftoken generation URL is the user’s
id_token, which cannot be used to identify the user without the user’s access token, which is not provided to the ftoken generation URL.- Parameters:¶
- f_token_url : str¶
URL to use for
f_tokengeneration. This package provides a default URL, but you can provide your own. The default URL is provided by imink.- 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. This cannot be used to identify the user without the user’s access token, which is not provided to the ftoken generation URL.
- step : Literal[1] | Literal[2]¶
The step number. This is either
1or2. This is used to identify the step in thef_tokengeneration process.- 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.
- coral_user_id : str | None¶
The Coral user ID of the user. This is used to verify the ftoken generation process. This is only required for step
2.
- Raises:¶
ValueError – In the case that the
coral_user_idis not provided for step2.FTokenException – In the case that the ftoken cannot be obtained from the ftoken generation URL.
- Returns:¶
str – The f token.
str – The request ID.
str – The timestamp.