# Guidelines for Application and Use of Mini Program Geolocation Interface

  • In order to further standardize the developer's invocation of the interface or function related to user information and protect the legitimate rights and interests of users, the platform will start to open access to the following geo-location-related interface calls on April 18, 2022.Mini Program Location Related Interface Adjustmentas well asNew Location Interface and Related Process Adjustments

  • If the Mini Program uses a geolocation interface in the code, but does not request the corresponding permission or does not declare it in requiredPrivateInfos as per the development documentation, it will not be submitted for code review. Therefore, in order to help developers better apply for Mini Program geolocation interface permissions and use, you can view the documentation below.

# Request permission

  • Can be accessed throughapplyPrivacyInterfaceInterface to request permissions for geolocation related APIs. Note that the api_The name parameter needs to be filled in with the correct interface name, case sensitive.
  • Prior to the submission of the application may be approved bygetPrivacyInterfaceInterface to see what geo-related APIs are available.
  • After the application is submitted, the results of the review will be pushed to the [third party platform] - Development information - Message and Event url]
  • Submitted for review, it is also possible to pass thegetPrivacyInterfaceInterface to view the audit results, reasons for rejection, and other information.

# Using the interface

  • Geolocation related interfaces used in the code, developers are required to commit interface of ext_json In the parameters use requiredPrivateInfos Configuration items are declared in the following code format:
{
  "template_id": "95",
  "ext_json": "{"requiredPrivateInfos":["onLocationChange","startLocationUpdate"]}",
  "user_version": "V1.0",
  "user_Desc": "test"
}

# Common problem

# 61039

  • This means that after uploading the code, the developer submits the code for review before the detection task is completed.
  • Developers can do this throughgetCodePrivacyInfo interfaceGet the test results, confirm the test task is completed before submitting the code review
  • In addition, do not try the upload code and submit code audit interface together, otherwise the detection task after each upload code is not over and a new detection task is initiated, and 61039 errors will still occur

# 61040

  • If the code uses a geolocation interface, but it is not ext_Configure requiredPrivateInfos in the json parameter. Then 61040 errors will occur when submitting the code review. At this point, developers can reupload the code (just configure requiredPrivateInfos as required when uploading the code)
  • If the code uses a geolocation related interface, but the Mini Program appid does not get the permission of the corresponding geolocation api, then 61040 error will appear when submitting the code for review.
  • If ext_Json has configured geolocation related interface, but the Mini Program appid has not obtained the permission of the corresponding geolocation api, then 61040 error will appear when submitting the code for review.
  • If the developer confirms that it is not necessary to use the geolocation related interface, then there is no need to apply for permission, only need to submit the code to review the privacy in the interface._api_not_Use parameter to declare that it is not used. If the developer confirms the need to use the API, it needs to pass theapplyPrivacyInterfaceInterface to apply for geographical location-related api permissions, and after the audit has been approved, the code review will be submitted.