Skip to content

a simple flask app to acquire wechat for work token and forwarding message to wechat for work api

License

Notifications You must be signed in to change notification settings

Theropod/send2wechat_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

send2wechat_template

a simple flask app to acquire wechat for work token and forwarding message to wechat for work api

usage

  • 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
}

files

  • app.py: main api
  • wechat_work_helper.py: helper functions to get wechat for work token and send message

why not using wechat apis like itchat/wechaty?

  1. My wechat for web is blocked
  2. I need wechat for pc always online, therefore cannot use other protocols

About

a simple flask app to acquire wechat for work token and forwarding message to wechat for work api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published