# Send a subscription notification

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

Send a subscription notification

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/message/subscribe/bizsend?access_token=ACCESS_TOKEN

# Cloud Calls

  • Call method: subscribeMessage.bizsend

  • The input and exit parameters are the same as the HTTPS call, which can be called in the cloud call documentation

# Third party invocation

  • This interface supports Third Party Platform generation business call.

  • The permission set to which this interface belongs is id: 89

  • 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
template_idstringyesRequired subscription template id
pagestringnoClick the template card after the jump page, only in this Weixin Mini Program pages.Support with parameters, (example index?foo=bar)。If the field is not filled, there are no bounces on the template
touserstringyesReceiver (user) openid
dataobjectyesTemplate content, formatting like { "phrase3": { "value": "approved" }, "name1": { "value": "subscription" }, "date2": { "value": "2019-12-25 09:42" } }
miniprogram_statestringyesJump Weixin Mini Program Type: developer for development version;Trial for the experience version; Formal version; By default, the official version is
langstringyesGo to Weixin Mini Program to view”Support zh_CN (Simplified Chinese), en_US (English), zh_HK (Traditional Chinese), zh_TW (Traditional Chinese), default to zh_CN

# Body.dataObject Payload

Template content, formatting like { "phrase3": { "value": "approved" }, "name1": { "value": "subscription" }, "date2": { "value": "2019-12-25 09:42" } }

Parameter NametypeRequired to fill inIntroductions
thing.DATAstringnoThings can be combined with Chinese characters, numbers, letters or symbols, within 20 characters
number.DATAnumbernoNumbers, only numbers, mixed decimal, 32 digits or less
symbol.DATAstringnoSymbols, within 5 bits, common symbols other than Chinese, English, and numbers, and cannot carry control characters such as changing lines
character_string.DATAstringnoCharacter string, which can be a combination of numbers, letters, or symbols up to 32 bits
time.DATAstringnoTime, 24-hour time format (supported + year and day), support for HH: MM: SS or HH:MM, support for filling time periods, connect between two time points with a "~" symbol, for example: "15:01" or "15:01 October 1, 2019"
date.DATAstringnoDate, year-day format (support + 24-hour time), support for filling time periods, and use '-', '/, '.' symbols to connect between two time points, such as: "October 1, 2019" or "October 1, 2019, 15: 01"
amount.DATAstringnoAmount, 1 currency sign + no more than 10 pure digits, can be mixed decimal, the end can be "yuan"
phone_number.DATAstringnoPhone number, within 17 numbers, numerals, symbols, Example: + 866-0766-66888866
car_number.DATAstringnoLicense plate number, less than 8 digits, the first and last digits can be Chinese characters, the rest are letters or numbers, such as: Guangdong A8Z888
name.DATAstringnoName, Chinese name within 10 characters; A pure English name in 20 letters; Mixed Chinese and alphabets count by Chinese name, within 10 words
phrase.DATAstringnoChinese characters, within 5 pure Chinese characters, for example: in distribution
letter.DATAstringnoLetters, letters within 32 bits

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError Description

# 4. Note

There are no special considerations for this interface

# 5. Code examples

Example Requests

  {
           "touser":"OPENID",
           "template_id":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
           "page":"http://weixin.qq.com/download",  
           "miniprogram":{
             "appid":"xiaochengxuappid12345",
             "pagepath":"index?foo=bar"
           },
           "client_msg_id":"MSG_000001",
           "data":{

                   "keyword1":{
                       "value":"巧克力"
                   },
                   "keyword2": {
                       "value":"39.8元"
                   },
                   "keyword3": {
                       "value":"2014年9月22日"
                   }
           }
       }

Return an example

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

# 6. Error code

There is no special error code for this interface, see General error code

# 7. Scope of application

How this interface can be invoked under different account types:
Official Account Service Account
Certification only Certification only
  • Authentication only: means that only authenticated accounts are allowed to be invoked by the enterprise entity, and accounts that are not authenticated or do not support authentication cannot be invoked.
  • Other account types that are not expressly stated may not be called on this interface without special instructions;