# Get the QR code
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
getTrialQRCode
# Functional description
Call this interface can get the experience version of the Mini Program two-dimensional code. If you encounter problems during use, you canOpen Platform Service Provider ZonePosting exchanges.
# Calling mode
# HTTPS call
GET https://api.weixin.qq.com/wxa/get_qrcode?access_token=ACCESS_TOKEN
# Third Party Invocation
The calling method and parameters are the same as HTTPS, only the calling token is different
The permission set to which this interface belongs is: 18, 86
After the service provider has been authorized with one of the permission sets, it can do so by usingauthorizer_access_TokenCalling on behalf of the merchant
# Request parameters
attribute | 初始值 | Required | Introductions |
---|---|---|---|
access_Token | string | yes | Third Party Platform Interface Invocation Voucherauthorizer_access_TokenThis parameter is URL Parameters, non Body Parameters. |
path | string | no | Scan the QR code to enter the specified page and bring parameters at the same time |
# Return parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Return code |
errmsg | string | Error message |
# Other Notes
- path Need to carry out a Urlencode, such as: page/index? Action = 1, need to fill in page%2Findex%3Faction%3D1
# Return Instructions
In the normal case of the request, the developer can directly send the returned binary result (response) Body) to save as a picture. Returned HTTP Head as follows:
HTTP/1.1 200 OK
Connection: close
Content-Type: image/jpeg
Content-disposition: attachment filename="QRCode.jpg"
Date: Sun, 06 Jan 2013 10:20:18 GMT
Cache-Control: no-cache, must-revalidate
Content-Length: 339721
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
https://api.weixin.qq.com/wxa/get_qrcode?access_token=ACCESS_TOKEN&path=page/index?action=1
# Return Data Example
{
"errcode": -1,
"errmsg": "system error"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
-1 | system error | The system is busy, please wait for the developer to try again |
40001 | invalid credential access_Token isinvalid or not latest | Obtain access_Token time AppSecret Error, or access_Token Invalid. Please take the developer more seriously. AppSecret Of the correctness, or to see if you are working for the appropriate Official Account message template Call interface |
40014 | invalid access_Token | Illegal access_Token Please take the developer seriously. 初始值_Token Of the validity (such as whether it is expired), or to see if you are working for the appropriate Official Account message template Call interface |
0 | ok | ok |