Skip to main content
Version: v2.0.0

WeCom (WeChat Work) connector

Audience: operators bridging EventMesh with WeCom (WeChat Work). WeCom bridge. Source receives WeCom callback events (plain-token verification mode: answers the GET echostr challenge, accepts POST JSON events); sink posts events to a WeCom group-robot webhook.


Classes

DirectionClassBehavior
Sourceorg.apache.eventmesh.connector.wecom.source.WecomSourceConnectorJDK HttpServer on connector.port+connector.path; GET echoes the echostr (URL challenge); POST parses the JSON event (event_type, from.user_id, msgid) into a CloudEvent and replies {"errcode":0}.
Sinkorg.apache.eventmesh.connector.wecom.sink.WecomSinkConnectorPOSTs each CloudEvent's payload to connector.webhookUrl.

Source configuration

KeyDefaultDescription
connector.port8095HTTP listen port
connector.path/wecomHTTP listen path
connector.tokeneventmeshCallback token configured in the WeCom admin console

Sink configuration

KeyDefaultDescription
connector.webhookUrl``WeCom group-robot webhook URL

Running

Set the app's receive-message URL to http://worker:8095/wecom; bin/start-connector.sh with -Dconnector.class=...WecomSourceConnector -Dconnector.mode=source