May 18, 2021 WeChat Mini Program Development Document
Access to WeChat city services, developers can use real-name information verification interface. T he main function of the implementation is that, with the user's consent, the real name information entered by the user (or business party) is verified through WeChat City Service, which is correct and consistent with the real name information reserved by the user when "opening WeChat payment". This interface is consistent with the open scope of access to city services and requires permission to click here for detailed instructions.
According to the steps described in 4.1, you need to get the code parameters first when you call the background API to verify the real name information. Here's how to get it:
1. How to request:
Jump to weChat City Service's appid and path appid: wx308bd2aeb83d3345 path:subPages/city/wxpay-auth/main
2, answer method:
After the user completes the confirmation, it will jump back to the business parties, and call the Code required to call the background interface in the extraData field, which is the Code field in EXTRADATA.If you need to understand how to handle the extraradata field, you can Click here to view more
3, the API of the background check real name information
Note: The backend API is consistent with the use of the applet API.To understand the method of using the applet API, click here to view detailed instructions
1. Request method: POST
2, request address:
https://api.weixin.qq.com/intp/realname/checkrealnameinfo?access_token=ACCESSTOKEN
Description: Access_token getting the way here, Click here to refer to Details
3, request format: json
4, request parameters:
Field | type | illustrate | Remark |
---|---|---|---|
openid | string | OpenID in the business party | Maintain consistent with the small program appid provided by the business side provided by the application permission |
real_name | string | Name | Requires the name of the verification |
cred_id | string | license number | Need to check the ID number |
cred_type | string | Default is 1, ie the ID card | Currently only support ID card |
code | string | Callback acquired code | Code parameters obtained by applying the small program |
5, return to the field:
Field | type | illustrate | Remark |
---|---|---|---|
errcode | int | 0 is successful for the interface | error code |
errmsg | string | Error tips when failing | wrong reason |
verify_openid
|
string |
V_OP_NA
The user is not yet authenticated by
V_OP_NM_MA
the user matches the
V_OP_NM_UM
the user does not match the name.
|
Use a sign when there are multiple results"; "Connection; |
verify_real_name
|
string |
Returns
V_OP_NM_MA
V_NM_ID_MA
V_NM_ID_UM
Name matches document number;
verify_openid
|
Check the results |