# Development Overview of the Weixin Official Accounts Platform

The Weixin Official Accounts Platform is used for operators to provide information and services to Weixin users via Official Accounts. The Official Accounts Platform APIs are the basis for service provision. After creating an Official Account and getting API permissions, the developer can start development by referring to this API documentation.

In order to identify users, a secure OpenID will be generated for each user of each Official Account. To use a unified user account across multiple Official Accounts or mobile apps, you need to go to the Weixin Open Platform to link these Official Accounts and apps to one Open Platform account. After linking, a user has multiple OpenIDs for different Official Accounts and apps, but has only one UnionID for all Official Accounts and apps under the same Open Platform account. Go to User Management > Get User's Basic Information (UnionID Mechanism) for details.


  1. The Weixin Official Accounts Platform is used to develop services for Weixin Official Accounts. To develop services for mobile apps, websites on PC, and Official Accounts third-party platforms (that provide services for Official Account operators from all walks of life), access Weixin Open Platform.

  2. Before the application for a verified Official Account is approved, you can quickly apply for an API test account via the test account application system to test and develop APIs. 3. During the development, you can use the API debugging tool to debug some of the APIs online.

  3. Each API is subject to a daily call quota. Go to Official Accounts Platform > Developer Center for details. 5. If any error occurs during the development, you can use the error code returned via the API and the alarm and troubleshooting guide (API alarms can be set in Official Accounts Platform > Developer Center) to locate and solve the problem.

  4. On the Official Accounts Platform, the access_token is used as the credential for calling APIs and required for calls to all APIs. It is valid for 2 hours and has a limited quota in one day, so save it properly. See the Get API Call Credential (access_token) documentation for details.

  5. Port 80 is supported only for calls to APIs of the Official Accounts Platform.

Official Accounts provide services to users primarily through Official Account chats and webpages within Official Accounts:

1. Official Account Chats

An Official Account exists in the form of a Weixin user's contact, and chat is the basis for the interaction between the Official Account and its users. Official Accounts come with following messaging services for different scenarios.

(1) Broadcast Message: Official Accounts can send broadcast messages to users at a certain frequency (1 time per day by Subscription Accounts, and 4 times per month by Service Accounts), including text messages, articles, images, videos, and voices.

(2) Passive Reply Message: When a user sends a message to an Official Account, the Weixin server forwards the message to the server address set by the developer in the Developer Center (the developer should verify message authenticity), and the Official Account replies to the message within 5 seconds by either sending a message or a command of no reply to the Weixin server. Passive reply messages can be encrypted by setting in Official Accounts Platform > Developer Center, and then will be handled according to the message encryption/decryption documentation. Other types of messages are returned by API not request, so encryption/decryption is not required.

(3) Customer Service Message: Generally in the Customer Service scenario, when an Official Account receives a message from a user within 48 hours, it can send an unlimited number of messages to the user. The user's behaviors trigger various events, and the Official Account will send Customer Service messages according to some of the events. For details, see Message Push and Event Description documents.

(4) Message Template: Official Accounts can send service notifications (such as Quick Pay results, or successful service appointment) to users using a specific content template.

2. Webpages within Official Accounts

For many complex business scenarios, services are provided via webpages, and the following information is required:

(1) Getting the user's basic information via webpage authorization: The developer shall acquire the consent of the user before collecting their basic information using this API (OpenID can be obtained without user's consent).

(2) Weixin JS-SDK: It is a toolkit for developers to use native Weixin features through JavaScript code on webpages. Developers can use it to record and play Weixin voice, listen to sharing events on Weixin, upload images from mobile album, take photos, and implement other capabilities on webpages.

# Typical Cases

We take the following Service Accounts as examples:

China Merchants Bank Credit Card Center

As a card holder, you can quickly query credit card bills, credit limit and points; quickly make repayments, and apply for paying bills by installments; connect to Customer Service via Weixin; make purchases using credit card, and receive transaction notifications via Weixin. You can also apply for a credit card via Weixin if you don't have one.

The China Merchants Bank Official Account guides users to securely link their Weixin IDs to their credit card numbers through prompt messages. Users can use the Official Account to query bills, receive payment notifications, and use other features that are implemented by the CMB's developer via the Official Account APIs.

China Southern Airlines

You can check in, choose a seat, query flight information, and check the weather in the destination city, and will receive professional services if you are a SkyPearl Club member.

The China Southern Airlines Official Account allows users to link their SkyPearl Club member cards with their Weixin IDs so that they can book flights, check orders, and even check in via the Official Account.

Guangdong Unicom

You can link your mobile number in Weixin to query your points, package balance, mobile data, and Weixin-specific data, and contact Customer Service.

The Guangdong Unicom Official Account allows users to link their mobile numbers to their Weixin IDs to query data usage and package balance. Users who purchase a "Weixin WO Card" can also get five exclusive privileges in Weixin.