WeChat Official Accounts API
HTTPS/JSON APIs for WeChat Official Accounts (Subscription Accounts and Service Accounts) — the publishing surface used by media, brands, and businesses to reach WeChat followers. Surface includes user-info & tagging, message receipt and reply (text, image, voice, video, news), template messages, customer service messages, custom menus, materials and asset management, QR code with scene parameters, web authorization (snsapi_base / snsapi_userinfo), and the JS-SDK for embedded webpages.
WeChat Official Accounts API is one of 16 APIs that WeChat publishes on the APIs.io network, described by an AsyncAPI event-driven specification.
Tagged areas include Official Accounts, Subscription Account, Service Account, Messaging, and Templates. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.
This event API exposes
20 operations
across 20 channels,
and defines 45 schemas.
It is described by AsyncAPI 2.6.0, at version 1.0.0.
The API connects through 3 servers: https://{yourDomain}{callbackPath} (https), https://{yourDomain}{notifyPath} (https), https://{yourDomain}{callbackPath} (https).
The identity and technical contract details declared by the specification.
OfficialAccountTextMessage
message
A follower sent a text message to the Official Account.
OfficialAccountImageMessage
message
A follower sent an image message to the Official Account.
OfficialAccountVoiceMessage
message
A follower sent a voice message to the Official Account.
OfficialAccountVideoMessage
message
A follower sent a video message to the Official Account.
OfficialAccountShortVideoMessage
message
A follower sent a short video message to the Official Account.
OfficialAccountLocationMessage
message
A follower sent a location message to the Official Account.
OfficialAccountLinkMessage
message
A follower sent a link message to the Official Account.
OfficialAccountSubscribeEvent
message
A user subscribed to the Official Account, or scanned a parameter QR code while not subscribed.
OfficialAccountUnsubscribeEvent
message
A user unsubscribed from the Official Account.
OfficialAccountScanEvent
message
A subscribed follower scanned a parameter QR code.
OfficialAccountLocationEvent
message
A follower reported their location.
OfficialAccountMenuClickEvent
message
A follower tapped a CLICK-type custom menu item.
OfficialAccountMenuViewEvent
message
A follower tapped a VIEW-type custom menu item.
OfficialAccountTemplateSendJobFinishEvent
message
Asynchronous delivery result for a template message send.
WechatPayTransactionSuccessNotification
message
Asynchronous notification that a payment succeeded.
WechatPayRefundNotification
message
Asynchronous notification that a refund was processed.
WecomTextMessage
message
A WeCom member sent a text message to a self-built app.
WecomSubscribeEvent
message
A WeCom member was added to a self-built app's visible range.
WecomUnsubscribeEvent
message
A WeCom member was removed from a self-built app's visible range.
WecomMenuClickEvent
message
A WeCom member tapped a CLICK-type custom menu item.
OfficialAccountBaseEnvelope
object
Common XML fields present in every Official Account message and event push. WeChat encodes payloads as XML inside a root ... element; the property names below…
4 properties
4 required
OfficialAccountTextMessagePayload
object
OfficialAccountImageMessagePayload
object
OfficialAccountVoiceMessagePayload
object
OfficialAccountVideoMessagePayload
object
OfficialAccountShortVideoMessagePayload
object
OfficialAccountLocationMessagePayload
object
OfficialAccountLinkMessagePayload
object
OfficialAccountEventBase
object
OfficialAccountSubscribeEventPayload
object
OfficialAccountUnsubscribeEventPayload
object
OfficialAccountScanEventPayload
object
OfficialAccountLocationEventPayload
object
OfficialAccountMenuClickEventPayload
object
OfficialAccountMenuViewEventPayload
object
OfficialAccountTemplateSendJobFinishEventPayload
object
WechatPayNotificationHeaders
object
HTTP headers attached by WeChat Pay to every APIv3 notification. These headers MUST be verified before the encrypted resource is decrypted.
4 properties
4 required
WechatPayNotificationEnvelope
object
Outer envelope of a WeChat Pay APIv3 notification. The business payload lives inside the resource object as AES-256-GCM ciphertext keyed by the merchant's APIv…
6 properties
5 required
WechatPayNotificationResource
object
Encrypted business payload of a WeChat Pay APIv3 notification. Decrypt ciphertext with AES-256-GCM using the merchant's APIv3 key, the supplied nonce, and asso…
5 properties
3 required
WecomBaseEnvelope
object
Common fields in WeCom message and event push XML payloads. WeCom uses the same root element as Official Accounts but adds AgentID to identify the self-built a…
5 properties
5 required
WecomTextMessagePayload
object
WecomSubscribeEventPayload
object
WecomUnsubscribeEventPayload
object
WecomMenuClickEventPayload
object
The full machine-readable AsyncAPI contract behind this narrative.
Other APIs WeChat publishes across the network.