Minigame Privacy Compliance Development Guide
I. Feature Introduction
To regulate developers' handling of users' personal information and safeguard users' legitimate rights and interests, the minigame platform provides standardized user privacy protection guidelines and standard privacy authorization reporting interfaces. Developers can use the following guidance to complete the configuration and exposure of privacy protection guidelines and the reporting of user authorization results.
II. Process Guide
Step 1 - Self-check: Whether you process users' personal information
Users' personal information refers to: all kinds of information recorded electronically or by other means that is related to an identified or identifiable natural person, excluding anonymized information, such as user nickname, avatar, phone number, etc.
Processing behavior: includes but is not limited to the collection, storage, use, processing, transmission, provision, disclosure, and deletion of personal information.
Step 2 - Configure the privacy policy: The privacy policy should fully disclose the purposes and methods of processing users' personal information
If your self-check finds that you do not process any users' personal information, simply go to "MP Settings - Service Content Statement - User Privacy Protection Guidelines - Confirm the commitment that no user information is processed", and you do not need to follow the subsequent process.
If you do process users' personal information, you need to go to "MP Settings - Service Content Statement - User Privacy Protection Guidelines - Update" to configure the privacy policy, and complete Step 3 and Step 4 as per the process.
Step 3 - Client-side privacy authorization interaction: This interaction is mainly used to expose and display the privacy policy to users in order to obtain their consent
- Custom setup: Developers can customize the design of a pop-up style that better matches the game style, including but not limited to a click-button consent authorization style and a checkbox consent authorization style.
Step 4 - Report user authorization information:
- The exposure of the custom setup and whether the user agrees to the privacy policy both need to be reported to the minigame platform so that user data interfaces can be called normally. For the specific reporting implementation, see 2.2.1.
2.1 User Privacy Protection Guidelines Setup
2.1.1 Standard APIs that process users' personal information
Please check whether the following interfaces or components (standard APIs) are used during minigame development configuration. The interfaces and their corresponding code lookups are shown in the table below.
Table 1 User Information Types
| User Information Type | Interface or Component |
|---|---|
| Nickname, avatar | sud.getUserInfo, sud.getUserProfile, sud.createUserInfoButton |
| Location information | sud.authorize({scope:'scope.userLocation'}), sud.authorize({scope: 'scope.userLocationBackground'}), sud.getLocation, sud.getFuzzyLocation |
| Selected photos or videos | sud.chooseImage, sud.chooseMedia |
| Selected files | sud.chooseMessageFile |
| Microphone | sud.authorize({scope: 'scope.record'}), sud.startRecord, RecorderManager.start, sud.joinVoIPChat |
| Camera | sud.authorize({scope: 'scope.camera'}), sud.createVKSession, sud.createCamera |
| Bluetooth | sud.openBluetoothAdapter, sud.createBLEPeripheralServer |
| Photo album (write-only) permission | sud.authorize({scope: 'scope.writePhotosAlbum'}), sud.saveImageToPhotosAlbum |
| Game community data | sud.getGameClubData |
| Live streaming data | sud.getChannelsLiveInfo |
| Accelerometer | sud.startAccelerometer |
| Magnetic field sensor | sud.startCompass |
| Direction sensor | sud.startDeviceMotionListening |
| Gyroscope sensor | sud.startGyroscope |
| Clipboard | sud.setClipboardData, sud.getClipboardData |
Note: If you use the above interfaces, it is recommended to handle the case where the user refuses authorization, to avoid affecting the user's online experience.
2.1.2 Non-standard APIs that process users' personal information
This broadly refers to all in-game behaviors that process users' personal information by means other than OpenPaaS APIs. For example, if personal information is processed in-game via a custom form, developers need to adapt it themselves and request the user's consent to the privacy policy at any time before processing the user information.
2.1.3 User Privacy Protection Statement
Users' personal information processed by the above two methods must be disclosed in compliance in the User Privacy Protection Guidelines. That is, log in with the corresponding minigame account (openpaas.sud.tech) (hereinafter referred to as the OpenPaaS platform), and complete the user privacy protection guidelines in "Settings - Basic Settings - User Privacy Protection Guidelines".
Note:
Processing users' personal information via non-standard APIs must also be declared, i.e., disclosed by "adding another custom information type".
After the guidelines are finally approved, the minigame platform will generate a Minigame Privacy Protection Guidelines document, providing an entry for users to view on the minigame's introduction page and other places, and the sud.openPrivacyContract capability is opened in-game, so developers can display the guideline content to users via this API at an appropriate time.
2.2 Privacy Policy Standard Setup
Displaying the privacy policy at the appropriate time in-game (this time must be before processing the user's personal information) and asking for the user's opinion is referred to in this document as "privacy policy standard setup".
Implementation forms of privacy policy standard setup:
2.2.1 Custom Setup
Developers can customize the implementation of the privacy policy standard setup, and only need to synchronize certain information with the minigame platform. The reference style and specific steps are as follows:
(1) Register a callback function that implements the custom privacy pop-up:
That is, implement the custom mode by passing a callback function to sud.onNeedPrivacyAuthorization.
sud.onNeedPrivacyAuthorization(resolve => {
// ------ Custom setup logic ------
// TODO: The developer pops up a custom privacy pop-up (if it is a checkbox style, the developer should automatically bring up the privacy checkbox page here)
// When the page is displayed to the user, the developer calls resolve({ event: 'exposureAuthorization' }) to inform the platform that the privacy pop-up page has been exposed
// After the user agrees, the developer calls resolve({ event: 'agree' }) to inform the platform that the user has agreed. resolve requires the user to have performed a click action.
// After the user refuses, the developer calls resolve({ event: 'disagree' }) to inform the platform that the user has refused. resolve requires the user to have performed a click action.
// Whether to control the interval and the interval duration can be implemented by the developer
// The checkbox style should be based on the click of the user's confirm button; there is no need to report every checkbox selection
// If you need to actively pop up, see sud.requirePrivacyAuthorize
});
// The pop-up interface must include a link to the "Privacy Protection Guidelines"; clicking it calls sud.openPrivacyContract to open the guideline details
sud.openPrivacyContract({
success: () => {}, // Opened successfully
fail: () => {}, // Failed to open
complete: () => {},
});
Note:
- The privacy pop-up page exposure, user consent, and user refusal must be reported to the minigame platform
- The privacy policy link must be opened using the sud.openPrivacyContract interface
(2) Actively display the pop-up to request user consent:
Pop-up timing:
If the user's consent has not been obtained before calling the relevant interface, the base library will actively pop up and expose the custom pop-up to obtain the user's consent authorization ("non-standard APIs" need to be adapted by the developer). Developers can, before processing the user's personal information, choose any appropriate time to bring up the privacy pop-up to obtain the user's consent authorization.
// Call sud.requirePrivacyAuthorize to bring up the custom privacy pop-up
// If the user has already agreed and the privacy policy has not changed, it directly skips the user confirmation stage and enters the success callback; otherwise it needs to bring up the privacy pop-up and request user confirmation (by calling the callback function registered via sud.onNeedPrivacyAuthorization to bring up the custom privacy pop-up), and only enters the success callback after the user agrees
sud.requirePrivacyAuthorize({
success: res => {
// Entering the success callback means the user has agreed to the privacy policy
// TODO: process the user's personal information via non-standard APIs
},
fail: () => {
// Entering the fail callback means the user has refused the privacy policy
// The game needs to abandon processing the user's personal information while not blocking the main game flow
},
complete()
})
Note: If the user refuses the privacy policy, it is recommended to handle it gracefully to avoid blocking the game process.
2.2.2 Privacy Pop-up Component
(1) How to enable the privacy pop-up component and its style:
The minigame platform provides a functional component that minigame developers can choose to adapt on their own, used to help implement the privacy policy standard setup. Developers need to enable it in OpenPaaS Platform - Basic Settings - Privacy Authorization Pop-up. After popping up, this component will ask for the user's consent, and only after the user agrees will it allow the developer to call the relevant APIs.
(2) Actively display the pop-up to request user consent:
Pop-up timing:
Developers can choose when to invoke the pop-up component. If the developer does not set it, the pop-up component will pop up automatically when a standard API is first called, and will pop up again if a new user information interface is declared ("non-standard APIs" need to be adapted by the developer). Developers can, before processing the user's personal information, choose any appropriate time to bring up the privacy pop-up to obtain the user's consent authorization.
// Call sud.requirePrivacyAuthorize to bring up the pop-up component
// If the user has already agreed and the privacy policy has not changed, it directly skips the user confirmation stage and enters the success callback; otherwise it needs to bring up the privacy pop-up and request user confirmation, and only enters the success callback after the user agrees
sud.requirePrivacyAuthorize({
success: res => {
// Process the user's personal information via non-standard APIs
},
fail: () => {},
complete: () => {},
});
(3) Configure the pop-up interval:
For the pop-up component, if the user refuses, it will not be brought up again within x seconds after the refusal. This interval can be configured by the developer in the officialPrivacyAuthorizationShowingGap field of game.json. The default interval is 10 seconds; a developer-configured value less than 10 seconds will not take effect.
After x seconds, calling the privacy interface again will pop up and ask the user for consent again.
// game.json
{
officialPrivacyAuthorizationShowingGap: 60; // Minimum interval of the privacy pop-up component, in seconds
}
Special note: Once enabled, this component cannot be turned off. If the developer completes the privacy policy standard setup via the custom pop-up in 2.2.1 and passes the minigame platform review, this feature will no longer be called.
2.3 Error Messages
Table 2 Error Messages
| Error Code | Error Message | Self-check & Self-test |
|---|---|---|
| errno | errMsg | --- |
| 104 | privacy permission is not authorized | The user has not agreed to the privacy policy authorization |
| 104 | click action before resolve is needed (custom pop-up only) | The minigame requires a click action before the logic after user consent can proceed |
| 104 | privacy permission is not authorized in gap (pop-up component only) | After the user clicks refuse, calling the privacy interface during the interval when the privacy pop-up does not appear returns an error |
| 112 | api scope is not declared in the privacy agreement | The use of this user information type has not been declared in the User Privacy Protection Guidelines on the OpenPaaS platform |
| 1025/1026 | please go to mp to announce your privacy usage | No user information type usage has been declared in the User Privacy Protection Guidelines on the OpenPaaS platform, or it has been declared that no user information is used |
| 1025/1026 | please implement the privacy pop-up feature | The privacy pop-up feature has not been implemented; refer to 2.2.1 or 2.2.2 to implement it |
