Getting User Info
Games support displaying user info. User info refers to a user's personal information such as nickname, avatar, and gender, used for displaying user info in the game, performing user matching, etc. Since user info is sensitive information, it requires the user's consent and authorization. It can only be displayed in the game after the user has been guided to grant authorization. The app can insert its own authorization flow into the game's user info retrieval process. The following two scenarios are used as examples:
Scenario 1: Getting User Info for the First Time (Unauthorized Scenario)
Allow the game to request the user info API. The server must verify the signature of the request parameters to ensure the request comes from a legitimate source. At the same time, enter the user authorization flow.
Scenario 2: Getting User Info When Already Authorized
If the user has already authorized their personal information to the minigame, the developer can record the user's personal information in the business backend. However, the user may modify their nickname or avatar. To ensure the personal information does not become outdated or invalid, the user info must be obtained again. Signature verification is required for the API in this case.
