In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use WeChat Mini Programs API to send customer service messages". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to use WeChat Mini Programs API to send customer service messages"!
Send customer service messages
When users interact with Mini Program customer service for specific actions (for a list of specific actions, please see below), Wechat will push the message data to developers, who can call the customer service API within a period of time (currently modified to 48 hours) and send messages to ordinary users through POST a JSON packet. This API is mainly used for customer service and other functions with manual message processing, making it convenient for developers to provide more high-quality services for users.
The list of allowed actions is as follows. After different actions are triggered, the number and time limit of messages sent by customer service APIs are different. When the number of messages sent reaches the limit, you will receive an error return code. For more information, please see the error code description page:
User action allows the number of messages to be issued limit the time limit for sending users enter the session through the customer service message button 1 1-minute user sends messages 5 48-hour customer service interfaces-send messages
API call request description
Http request method: POST https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
The JSON 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"}
Send a picture-text link
You can send one picture and text link at a time.
{"touser": "OPENID", "msgtype": "link", "link": {"title": "Happy Day", "description": "Is Really A Happy Day", "url": "URL", "thumb_url": "THUMB_URL"}}
Parameter description
Whether the parameter must indicate whether access_token is the calling API credential touser is the ordinary user (openid) msgtype is the message type, the text is text, and the image link is linkcontent is the text message content media_id is the media ID of the picture sent, which is obtained by uploading the image file through the new material API. Title is the picture-text link message title description is the picture-text link message url is the link that jumps after the picture-text link message is clicked picurl is the picture link of the picture-text link message, supports JPG, PNG format, the better effect is big picture 640 X 320, small picture 80 X 80
Return code description
The parameter indicates that-1 the system is busy. Please try again later. If the request is successful and 40001 gets the access_token, the AppSecret error occurs, or the access_token is invalid. Please developers carefully compare the correctness of AppSecret, or check whether the interface 40002 illegal credential type 40003 illegal OpenID is being called for the appropriate Mini Program. Please confirm whether OpenID is the OpenID45015 reply time of other Mini Program exceeds the limit 45047 customer service API number of downlink exceeds the upper limit 48001api function is not authorized, please make sure that Mini Program has obtained this API to this I believe you have a deeper understanding of "how to use WeChat Mini Programs API to send customer service messages". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.