Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to send customer service messages using customer service interface in the development of Wechat public platform

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the development of Wechat public platform how to use the customer service interface to send customer service messages, the article is very detailed, has a certain reference value, interested friends must finish reading!

When users actively send messages to official accounts (including sending messages, clicking custom menu clike events, subscribing events, scanning QR code events, payment success events, user rights protection), Wechat will push the message data to developers, who can call the customer service message interface within a period of time (currently 24 hours) and send messages to ordinary users through POST a JSON packet. There is no limit on the number of times to send within 24 hours. 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.

First, obtain ACCESS_TOKEN

Http request method: GET

Https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET

Whether the parameter must indicate whether grant_type is obtained by access_token. Fill in that client_credentialappid is the only credential key for third-party users. Secret is the unique credential key for third-party users, that is, appsecret.

Normally, Wechat will return the following JSON packets to the official account:

{"access_token": "ACCESS_TOKEN", "expires_in": 7200}

2. Send messages

Send a text message

Send pictures (media_id needs to upload pictures first to get them)

$img ='{"touser": "oLVPpjqs9BhvzwPj5A-vTYAX3GLc", "msgtype": "image", "image": {"media_id": "jViS8sQUXIh7rTdkz2qUOD5pvChYpp50i9rsLR4YnCm-pqdpiHhz6xbN2KAboScV"}}'

The following is a screenshot of a customer service system developed using the customer interface

The above is all the contents of the article "how to send customer service messages using customer service interface in the development of Wechat public platform". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report