caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.9k stars 384 forks source link

Support: Wxpusher #1133

Open codejiangqihan opened 1 month ago

codejiangqihan commented 1 month ago

:loudspeaker: What is the name of the service?

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

:bulb: Anything else? This is a service I am using. It can send information in the form of a WeChat official account message to WeChat. I hope it can be supported.

caronc commented 1 month ago

@codejiangqihan have a look at the PR listed above and give it a test run if you wouldn't mind? I would appreciate your feedback.

codejiangqihan commented 1 month ago

I tried, and the command executed successfully, but no messages were received on WeChat. I tested using a MacOS virtual machine outside mainland China, which may have caused the issue due to network reasons. Further testing is needed.

I tried, and the command executed successfully, but no messages were received on WeChat. I tested using a MacOS virtual machine outside mainland China, which may have caused the issue due to network reasons. Further testing is needed.

caronc commented 1 month ago

Hmm, are you using WeChat or WxPusher? I made some more changes. Can you pull the latest branch (follow link above) and give it another try?

codejiangqihan commented 1 month ago

Hmm, are you using WeChat or WxPusher? I made some more changes. Can you pull the latest branch (follow link above) and give it another try?

Wxpusher is a tool for sending messages to WeChat (specifically to their official WeChat public account). I tested it, but it still doesn't work. The error message is: "2024-06-02 23:44:31,244 - WARNING - Failed to send WxPusher notification: error=200." The message was not pushed to their official WeChat public account. The command I used is: apprise -vv -t "Test Message Title" -b "Test Message Body" -n failure \ wxpusher://appToken/UID

caronc commented 4 weeks ago

@codejiangqihan hmm, strange. When you specific the UID, you prefix it with UID_

If you run with -vvv, you will receive more debugging information. I feel that we are close!

codejiangqihan commented 3 weeks ago

Tip: > wxpusher://AT*****/UID* 2024-06-05 22:10:16,038 - DEBUG - Could not load translation path: /Users/runner/work/mac/mac/apprise/lib/python3.12/site-packages/apprise/i18n/en 2024-06-05 22:10:16,154 - DEBUG - Notification Plugin 106(s) and 151 Schema(s) loaded in 0.1142s 2024-06-05 22:10:16,155 - DEBUG - Loaded WxPusher URL: wxpusher://***/UID_/?format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes 2024-06-05 22:10:16,155 - DEBUG - WxPusher POST URL: https://wxpusher.zjiecode.com/api/send/message (certverify=True) 2024-06-05 22:10:16,155 - DEBUG - WxPusher Payload: {'appToken': 'AT', 'content': 'Test Message Body', 'summary': 'Test Message Title', 'contentType': 0, 'topicIds': [], 'uids': ['UID_'], 'verifyPay': False, 'verifyPayType': 0, 'url': None} 2024-06-05 22:10:16,941 - WARNING - Failed to send WxPusher notification: error=200. 2024-06-05 22:10:16,941 - DEBUG - Response Details: {'code': 1001, 'msg': 'contentType错误', 'data': None, 'success': False}

caronc commented 2 weeks ago

I made some subtle changes, I'm not sure if they helped out at all. Maybe give it another try? Make sure to grab the latest changes.

I can't find any source (well in English anyway) that can help me diagnose the error you're seeing. I feel I've followed the documentation properly, but there must be something I'm missing...

codejiangqihan commented 2 weeks ago

I made some subtle changes, I'm not sure if they helped out at all. Maybe give it another try? Make sure to grab the latest changes.

I can't find any source (well in English anyway) that can help me diagnose the error you're seeing. I feel I've followed the documentation properly, but there must be something I'm missing... This is the current error message: 2024-06-17 10:22:09,261 - DEBUG - Notification Plugin 106(s) and 151 Schema(s) loaded in 0.0806s 2024-06-17 10:22:09,262 - DEBUG - Loaded WxPusher URL: wxpusher:///UID_****/?format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes 2024-06-17 10:22:09,262 - DEBUG - WxPusher POST URL: https://wxpusher.zjiecode.com/api/send/message (certverify=True) 2024-06-17 10:22:09,262 - DEBUG - WxPusher Payload: {'appToken': 'AT', 'content': 'Test Message Body', 'summary': 'Test Message Title', 'contentType': 0, 'topicIds': [], 'uids': ['UID_*****'], 'verifyPay': False, 'url': None} 2024-06-17 10:22:09,779 - WARNING - Failed to send WxPusher notification: error=200. 2024-06-17 10:22:09,779 - DEBUG - Response Details: {'code': 1001, 'msg': 'contentType错误', 'data': None, 'success': False}

I have a project request method as follows. Use POST to make a request. The request URL is https://wxpusher.zjiecode.com/api/send/message The request body is:{"appToken":"AT*","topicIds":[],"content":"","contentType":"1","uids":["UID*****"]}