apprise icon indicating copy to clipboard operation
apprise copied to clipboard

Add WeChat Support

Open caronc opened this issue 1 year ago • 5 comments

:loudspeaker: What is the name of the service? WeChat

:link: Provide some details about the service that can help with it's development.

  • Homepage:
  • API Reference:

One link i found (not sure if official): link

:bulb: Anything else?

caronc avatar Jul 26 '23 18:07 caronc

It's so great to hear that WeChat is on plan. 👍🏻

Here I provide is about WeChat Work Send Message Api Doc. As I know, for regular WeChat app, it don't provide any send message api for developers.

Homepage: https://developer.work.weixin.qq.com/document API Reference:

  • https://developer.work.weixin.qq.com/document/path/90235
  • https://developer.work.weixin.qq.com/document/path/90236

Here's a py implement for wechat sdk: https://github.com/wechatpy/wechatpy For this api details: https://wechatpy.readthedocs.io/zh_CN/stable/enterprise/client.html#id12

Unfortunately, they're all in Chinese, feel free to contact me if you need help with translation.

catfishlty avatar Jul 31 '23 08:07 catfishlty

I wasn't' aware that integration with WeChat (leveraging it's API) requires some 2 way communication and exchanges. I may have to hold off supporting this plugin until i can think of a clever way to handle these kind of setups.

caronc avatar Aug 19 '23 17:08 caronc

@caronc I'm not sure which products are you mentioned? WeChat? or WeCom (WeChat for Work)?

If you mean 'WeChat', I highly recommend against supporting it. As far as I know, it's very hard to implement WeChat notify api, because there's no any official apis (internal communicate protocols maybe). It's not worth it.

But for WeCom, I think it's ok.

Here's on more Python example for sending WeCom Application Message。 https://github.com/whyour/qinglong/blob/89164a3bd2492e594b714a80c70c20c4282741c5/sample/notify.py#L390-L422

catfishlty avatar Aug 21 '23 05:08 catfishlty

@catfishlty sorry for being so slow to reply. WeCom Bot support now added. :rocket: . Would you want the WeCom for Work functionality too? I'm a bit confused how it works...

It appears you can use some remote central server, as well as a self hosted solution? Is this correct?

caronc avatar Dec 16 '23 22:12 caronc

@caronc Thanks for your great work, it's never too late for your contribution. I'll check this wonderful feature later, and give you some feedbacks.

Would you want the WeCom for Work functionality too? I'm a bit confused how it works...

For this, it's indeed very complicated. First, need to setup some template configs on WeCom Admin Web. And then call api with message_id(template_id) and auth key(token) to send the notification.

It appears you can use some remote central server, as well as a self hosted solution? Is this correct?

Yes, I use it for my Home Lab. Because WeCom product can provider greater notification reachability for Chinese users.

catfishlty avatar Dec 18 '23 02:12 catfishlty