Recently wrote an app to alert you to send WeChat template messages

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed. > here [GitHub address] (Https://github.com/SugarAYuan/WeChatAlarm) > in the future I intend to integrate the log system, as well as timing scripts and so on, then make a page tick Shang to solve the configuration problem. > There is a bad place to write, please make a lot of mistakes: Thank you ~~-first change the configuration file (CONFIG.TOML) in AppID and secret and then run the script ' Shell./alarm server started listening port: 9200 '-Second step Note the template ID in config is configured to write the corresponding template configuration to Template.json in the "json//Add template ID of the JSON configuration in Template.json///For example {" Corresponding template id ": {" First ": {" Value ":", "Color": "#173177"}, "remark": {"Value": "Click to view Details!" "," Color ":" #173177 "}}"-Third step to send POST request ' shell# multiple user use, number delimited curl-d ' {"User": "Xiaowang,xiaozhang", "message": {" First ":" AAAAA "," remark ":" Remark "}," Template_key ":" Test "," url ":" Www.baidu.com "} ' 127.0.0.1:9200# The server that was just started will make a request for a POST request: Create success {"Access_token": "token", "expires_in": 7200} Current token: Token expiration time: 7,200 seconds POST request: Create success {" Errcode ": 0," errmsg ":" OK "," MsgId ": 22212}" 255 reads

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.