# checkrealnameinfo

Access to the WeChat city service, the developer Mini Program can use the real-name information verification interface. The main function is to verify the real-name information entered by users (or business parties) through the WeChat city service with the user's consent. Whether it is correct and consistent with the real name information reserved by the user when "opening WeChat Pay." This interface is consistent with the open scope of access to the city services, you need to apply for permission toClick here for details

# Interface documentation

# 1, business process explaination

  1. Step 1: The interface of the Mini Program of the business side. If you need to realize real-name information verification, you should jump to the authorization page of the mini program provided by the WeChat city service according to the path provided in the interface document.

  2. Step 2: After the user clicks the consent confirmation on the WeChat authorization page, the WeChat will jump back to the business side Mini Program and bring thecodeParameter (codeParameters are contained in the returnedextraData)。

  3. Step 3: Get the business pagecodeAfter that, you need to call the background API provided by WeChat to verify the real-name information. After the verification, the business side will complete its own business process according to the specific situation.

# 2, get the code parameters

According to the steps described in 4.1, when calling the background API to verify real-name information, you need to get the code parameter first. Access is as follows:

  1. Request method:

Jump to app id and path provided by WeChat city service appid:wx308bd2aeb83d3345 path:subPages/city/wxpay-auth/main

  1. Response:

After the user completes the confirmation agreement, will jump back to the business side Mini Program, and in the extranData field with the code needed to call the background interface, namely the code field in extrandata. To learn how to handle extraData fields, you canClick here to see more

3, the background check real-name information API

Note: This background API is used in the same way as the Mini Program API. To learn how to use the Mini Program API, pleaseClick here for details

Request method: POST

  1. Address of request:

https://api.weixin.qq.com/intp/realname/checkrealnameinfoaccess_token=ACCESSTOKEN

Dxplaination: access here_Token get method, can beClick here for details

  1. Request format: JSON

  2. Request parameters:

field type Introductions Remarks
openid string User openid under business side Consistent with the business side Mini Program appid provided when requesting permission
real_name string Full name Name to be checked
I think_id string Certificate number Certificate number to be checked
I think_type string Default is 1, that is, ID card Currently only ID cards are supported
code string Code acquired by callback Code parameters obtained by Mini Program jumping back
  1. Return field:
field type Introductions Remarks
Errcode int 0 Successful call for interface Error code
errmsg string Error message on failure Wrong reason
verify_openid string In_OP_ONThe user has not registeredIn_OP_NM_BUT: User name matchesIn_OP_NM_AT: The user does not match the name. Semicolon for multiple results”” Connect
verify_real_name string whenverify_openid forIn_OP_NM_BUT Return to:In_NM_ID_BUT: Name and ID number matchIn_NM_ID_ATName does not match ID number. Checkout result