WeChat Mini Program API Send Customer Service Messages
Send customer service message
When the user interacts with the mini program customer service through specific actions (see the description below for the specific action list), WeChat will push the message data to the developer, and the developer You can call the customer service interface within a period of time (currently modified to 48 hours) and send messages to ordinary users by POSTing a JSON data packet. This interface is mainly used for functions such as customer service that require manual message processing, so that developers can provide users with better services.
The list of currently allowed actions is as follows. After different actions are triggered, the number of messages allowed to be delivered by the customer service interface and the delivery time limit are different. After the number of articles issued reaches the upper limit, an error return code will be received. For details, please see the return code description page:
User Action | Allow the issue of articles Number limit | Issue time limit |
---|---|---|
Users enter the session through the customer service message button | 1 message | 1 minute |
User sends message | 3 messages | 48 hours |
Customer service interface -Send a message
Interface call request description
http请求方式: POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
The JSON data packets required for each message type are as follows:
Send a text message
{ "touser":"OPENID", "msgtype":"text", "text": { "content":"Hello World" } }
Send a picture message
{ "touser":"OPENID", "msgtype":"image", "image": { "media_id":"MEDIA_ID" }