# Rules for posting QR codes

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: qrcodeJumpPublish

This interface takes effect when the QR code rule is published, and when an existing user scans the QR code for the rule Service Account and hits it, they are redirected to the page specified in the official version Weixin Mini Program.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/wxopen/qrcodejumppublish?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
prefixstringyesQR code rules.If it is Service Account, it is the reference two-dimensional url of the service number.

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError message

# 4. Note

# Instructions for invoking

  • The interface is suitable for publishing a set QR code rule for "scan the normal QR code to open Weixin Mini Program" and for publishing the set QR code Rule for "scan a QR code for Service Account to open a Mini Program."

# Service Account Call Dxplaination

  • In order to invoke this interface, the service provider must first obtain Service Account The permission set id of 3 must be authorized to the service provider, otherwise the 61007 error will occur.
  • Service Account The interface must be associated with Weixin Mini Program before it can be invoked. If the service number has not been associated with the Mini Program, it can be associated through the linkMiniprogram interface, or in the Official Account management background - advertising and services - Mini Program management

# 5. Code examples

# 5.1 Publish "Scan Normal Binary Code to Open Weixin Mini Program" Set Binary Code Rules

Example Requests

{
  "prefix": "https://weixin.qq.com/qrcodejump"
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok"
}

# 5.2 Publish "Scan Service Account Binary Code Open Weixin Mini Program" set binary code rules

Example Requests

{
  "prefix": "http://weixin.qq.com/q/02P5KzM_xxxxx"
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok"
}

# 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
-1The system is busy.The system is busy.
0oknormal
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
44990Interface requests are too fastInterface requests are too fast (more than 5 times / second)
45112The system is busy. Please try again later.Please try again later.
85074Weixin Mini Program Not releasedWeixin Mini Program Code must be published before you can publish two-dimensional code jump rules
85075Personal type Weixin Mini Program cannot be setPersonal Type Weixin Mini Program Unable to set binary code rules
85095Data exceptionsThe data is exceptional. Please delete it and add it again
886000beyond publish count this month Number of releases reached online this month (100 times)
886001The system is busy, please try again.The 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.