a simple flask app to acquire wechat for work token and forwarding message to wechat for work api
- setup account and your make an app in wechat for work, then acquire corpid, corpsecret, agentid (see this tutorial )
flask run --host=0.0.0.0
to open server(not in production)- set something to automatically send data to your flask app. e.g. I use zapier to send my new ms todo entries to http://myhost:5000/send2wechat/api/v1/mstodo payloadtype:json
{
'time': time,
'subject': subject,
'content': content
}
- app.py: main api
- wechat_work_helper.py: helper functions to get wechat for work token and send message
- My wechat for web is blocked
- I need wechat for pc always online, therefore cannot use other protocols