WeChat public platform development (73) Send customer service messages

Source: Internet
Author: User

Public platform development Customer Service Interface to send customer service messages
Author: Fang Times studio
Address: http://www.cnblogs.com/txw1958/p/weixin73-custom-send.html

 

When a user actively sends a message to the public account (including sending information, clicking a custom menu clike event, subscribing to an event, scanning a QR code event, successful payment event, and rights protection ), message data will be pushed to developers. developers can call the customer service message interface within a period of time (currently 24 hours) and send messages to common users by posting a JSON data packet, the number of sending times is not limited within 24 hours. This interface is mainly used for customer service and other features with manual message processing links, so that developers can provide users with better services.

 

1. Get ACCESS_TOKEN

Http Request Method: GET
Https://api.weixin.qq.com/cgi-bin/token? Grant_type = client_credential & appid = APPID & secret = APPSECRET

Parameters Required? Description
Grant_type Yes Obtain access_token and enter client_credential
Appid Yes Unique third-party user credential
Secret Yes The unique credential key of a third-party user, which is appsecret

Normally, the following JSON data packet is returned to the Public Account:
{& Quot; access_token & quot;: & quot; ACCESS_TOKEN & quot;, & quot; expires_in & quot;: 7200}

 

Ii. Send messages

Send text messages

 = '' = "NU7Kr6v9L9TQaqm5NE3OTPctTZx797Wxw4Snd2WL2HHBqLCiXlDVOw2l-Se0I-WmOLLniAYLAwzhbYhXNjbLc_KAA092cxkmpj5FpuqNO0IL7bB0Exz5s5qC9Umypy-rz2y441W9qgfnmNtIZWSjSQ" = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=". = https_post(,( https_post(, =, CURLOPT_URL, , CURLOPT_SSL_VERIFYPEER, , CURLOPT_SSL_VERIFYHOST, , CURLOPT_POST, 1, CURLOPT_POSTFIELDS, , CURLOPT_RETURNTRANSFER, 1 = curl_exec( (curl_errno( 'Errno'.curl_error( 

Send an image (media_id needs to be uploaded first)

 = '';

 

 

========================================================== ====

Follow-up methods for fanwe public platform accounts:
1. Address Book-Add friends-search for Public Accounts-search for "fangtimes Studio"
2. Address Book-add friend-search number-Enter "pondbaystudio"
3. Scan the following QR code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.