# Get set rules

Debugging Tools

Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide

Interface name: qrcodeJumpGet

This interface is used to obtain QR code rules that have already been set.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumpget?access_token=ACCESS_TOKEN

# Cloud Calls

  • This interface does not support cloud calls

# Third party invocation

  • This interface supports Third Party Platform generation business call.

  • This interface belongs to the permission set id: 3, 18

  • When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invocation credentials, using access_token , authorizer_access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
appidstringyesWeixin Mini Program of AppID.
get_typenumberyesThe default value is 0. 0: Enquire about 10,000 new entries recently (the number is generally recommended 1 or 2); 1: prefix query; 2: Query by page, returning in the new order.
prefix_listarraynoPrefix query, get_type = 1 must pass, up to 200 prefixes.
page_numnumbernoPage number, get_type = 2 must pass, starting from 1.
page_sizenumbernoNumber per page, get_type = 2 must pass, maximum 200.

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError message
rule_listobjarrayList of QR Code Rules Details
qrcodejump_opennumberHave you already opened the QR code to jump link settings?
list_sizenumberNumber of QR Code Rules
qrcodejump_pub_quotanumberHow many more can be posted this month
total_countnumberQR code rule total data amount for paging queries

# Res.rule_list(Array)Object Payload

List of QR Code Rules Details

Parameter NametypeIntroductions
prefixstringBinary code rules, explaination, Service Account Binary code rules are filtered not shown.
pathstringWeixin Mini Program Feature page.
statenumberRelease flag bits, 1 means not released, and 2 means released.
open_versionnumber 测试范围。

获取“扫普通二维码打开小程序”已设置的二维码规则才返回这个参数。

1表示开发版(配置只对开发者生效);2表示体验版(配置对管理员、体验者生效);3表示正式版(配置对开发者、管理员和体验者生效)。

特别说明,不管普通二维码规则是否发布,开发者/体验者/管理员在扫描 debug_url 所对应的二维码时,都会根据 open_version 来决定打开开发版、体验版或正式版
debug_urlarrayTest Link (Select) You can complete no more than 5 full QR code links for the test. This link must meet the QR code rules that have been filled out.Returns this parameter before getting the "Scan normal binary code to open Weixin Mini Program" set binary code rule.

# 4. Note

# Instructions for invoking

  • This interface is used to obtain set QR code rules, which are suitable for obtaining a set QR code rule for "scan the normal QR code to open Weixin Mini Program" and for obtaining the set QR code Rule for "scan Service Account QR code to Open a Small Program."
  • If it is to get "sweep ordinary binary code open Weixin Mini Program" has set the binary code rules, then without any input, the use of Mini Program authorizer_access_token can be called.
  • To obtain a set QR code rule for "scan Service Account QR code to open Weixin Mini Program," you need to pass parameters such as AppID, get_type, prefix_list, page_num, page_size, etc. See the documentation below for more details.

# Service Account Call Dxplaination

  • In order for the service provider to invoke the interface to obtain the set QR code rules for "scan Service Account QR code to open Weixin Mini Program QR code," it must first obtain the service number and authorize the permission set with id 3 to the service provider, otherwise the error 61007 will occur.
  • Service Account The interface must be associated with Weixin Mini Program before it can be invoked. If a service number does not already associate a Mini Program, you can associate Mini Programs through the linkMiniprogram interface, or at "Official Account Administration Console - Advertising & Services - Mini Program management."

# 5. Code examples

# 5.1 Gets the binary code rules set by "Scan Normal Binary Code Open Weixin Mini Program"

Example Requests

{
  "appid": "wx1234567890abcdef",
  "get_type": 1,
  "prefix_list": [
    "https://weixin.qq.com/qrcodejump"
  ]
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok",
  "rule_list": [
    {
      "prefix": "https://weixin.qq.com/qrcodejump",
      "open_version": 1,
      "state": 1,
      "permit_sub_rule": 1,
      "path": "pages / index / index ",
      "debug_url": [
        "https://weixin.qq.com/qrcodejump?a=1",
        "https://weixin.qq.com/qrcodejump?a=1",
        "https://weixin.qq.com/qrcodejump?a=2",
        "https: //weixin.qq.com/qrcodejump?a=2"
      ]
    },
    {
      "prefix": "https://weixin.qq.com/qrcodejumptest",
      "open_version": 1,
      "state": 1,
      "permit_sub_rule": 1,
      "path": "pages/index/index",
      "debug_url": [
        "https://weixin.qq.com/qrcodejumptest?a=1",
        "https://weixin.qq.com/qrcodejumptest?a=1",
        "https://weixin.qq.com/qrcodejumptest?a=2",
        "https: //weixin.qq.com/qrcodejumptest?a=2"
      ]
    }
  ],
  "qrcodejump_open": 0,
  "list_size": 2,
  "qrcodejump_pub_quota": 20,
  "total_count": 3
}

# 5.2 Gets the binary code rule set by Scan Service Account Open Weixin Mini Program

Example Requests

{
  "appid": "wx1234567890abcdef",
  "get_type": 1,
  "prefix_list": [
    "https://weixin.qq.com/qrcodejump"
  ]
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok",
  "rule_list": [
    {
      "prefix": "https://weixin.qq.com/qrcodejump",
      "state": 1,
      "path": "pages/index/index"
    },
    {
      "prefix": "https://weixin.qq.com/qrcodejumptest",
      "state": 1,
      "path": "pages/index/index"
    }
  ],
  "qrcodejump_open": 0,
  "list_size": 2,
  "qrcodejump_pub_quota": 20,
  "total_count": 10
}

# 6. Error code

The following is a list of error codes for this interface, other error codes can refer to General error codes

Error codeError DescriptionSolutions
-1system errorThe system is busy, so the developer is asked to try again in a few minutes.
0oksuccess
40001invalid credential  access_token isinvalid or not latestAppSecret error while getting access_token, or access_token is invalid.Developers should check that AppSecret is correct, or that they are calling interfaces for the appropriate Official Account
40097The parameter is incorrect.Request parameter error
40166 invalid appidAppID Invalid parameters
44990Interface requests are too fastMore than 5 times / second frequency limit
85075can not accessPersonal Type Weixin Mini Program Unable to set binary code rules
886001The system is busy.Please try again.

# 7. Scope of application

This interface supports "Service Account (authentication only)" account type calls.None of the other account types can be invoked without special instructions.