Weiguanjia (Service Provider Manager) Usage and FAQ

View Markdown

Last edited on 2026-07-04

"Weiguanjia for Service Providers" is an open-source project deployed on "WeChat Cloud Hosting." It provides backend services for third-party platforms and management tools for third-party platforms, thereby lowering the barrier for WeChat developers to integrate with the Open Platform as a service provider.

Note: "Weiguanjia for Service Providers" is not mandatory. Developers can build their own platform to integrate with the "WeChat Third-Party Platform."

If your third-party platform has "Weiguanjia for Service Providers" installed, but the cloud hosting environment was destroyed or the installation was uninstalled for various reasons, please read this document's section "VI. Frequently Asked Questions" for a solution.

1. Feature Overview

To help developers focus more on business development and reduce costs associated with environment setup and management tool construction, WeChat has introduced the "One-Click Setup for Third-Party Platform Backend Services" and "One-Click Access to Third-Party Platform Management Tools" features. This empowers developers to build their businesses on the Third-Party Platform more efficiently.

The service is available as both images and source code. With one-click deployment, developers can obtain a ready-to-use backend service and a Service Provider SaaS application (Service Provider Manager). It also supports development integration for Service Provider businesses.

The service can be deployed with one click to WeChat Cloud Hosting. The source code is available at wxcloudrun-wxcomponent, allowing developers to download it for secondary development.

If you encounter any issues while using this feature, please provide feedback via the WeChat Open Platform Service Provider Section.

1. Feature List

The current latest version of this tool is v2.1.0. It includes the following features. There are no current plans for further updates. Developers can upgrade and optimize it independently based on the source code:

  • Authorized Account Management: Perform visualized management for Official Accounts/Mini Programs (Mini Program) authorized to third-party platforms in batches.
  • Mini Program (Mini Program) Development as Agent: Perform operations such as submitting code, submitting for review, and submitting for release.
  • Third-Party Token Retrieval: One-click retrieval of component_verify_ticket, component_access_token, authorizer_access_token, and WeChat tokens to facilitate debugging for developers.
  • Third-Party Message Viewing: One-click retrieval of messages pushed to the Authorized Event URL and Message and Event URLs to facilitate debugging for developers.
  • Third-Party Authorization Page Generation: One-click generation of PC and H5 version authorization pages. Merchants can scan the QR code or directly access the authorization page to complete the authorization process.
  • Message Forwarder: Forward messages received from WeChat official pushes to the service provider's business services to enable integration with business systems.
  • Proxy Configurator: Pass through and forward external requests to the service provider's business services, thereby enabling integration of Wei Guanjia with other business systems.

2. Usage Conditions

2.1 Obtaining Ticket and Token

This module provides one-click retrieval of component_verify_ticket, component_access_token, authorizer_access_token, and WeChat tokens to facilitate debugging for developers. However, if the Third-party Platform does not use the default configuration generated after deploying to Cloud, related functionalities will be affected. Specifically:

  • If the "Authorization Event Configuration" does not use the environment ID, service name, and message path generated by the system, component_verify_ticket cannot be retrieved with one click via the Third-party Platform Management Tool.
  • If the "Authorization Event Configuration" does not use the environment ID, service name, and message path generated by the system, component_access_token cannot be retrieved with one click via the Third-party Platform Management Tool.

2.2 View Messages and Events

This module provides a feature to retrieve messages pushed to the Authorized Event URL and the Messages & Events URL with one click, facilitating debugging for developers. However, if the third-party platform does not use the default configuration generated after deploying to the Cloud Service, the usage of related functions will be affected. Specifically:

  • If the "Authorized Event Configuration" does not use the environment ID, service name, and message path generated by the system, messages pushed by the WeChat platform to the original "Authorized Event URL" cannot be viewed in the Third-Party Platform Management Tool.
  • If the "Messages & Events Configuration" does not use the environment ID, service name, and message path generated by the system, messages pushed by the WeChat platform to the original "Messages & Events URL" cannot be viewed in the Third-Party Platform Management Tool.

2.3 Authorized Account Management

This module provides features to view basic information of authorized accounts, view the list of authorized permission sets, and obtain refresh_token and authorizer_access_token. If the third-party platform does not use the default configuration generated after deploying cloud services, it will not affect the usage of these related features.

2.4 Authorization Page Generation

This module provides the capability to generate PC and H5 authorization pages with a single click. Service providers can share the page link with merchants, who can then complete the authorization process by scanning the QR code or visiting the authorization page directly. However, if the third-party platform’s "Authorization Login Domain" does not use the default configuration generated after deploying the cloud service, this feature may be affected.

II. Operation Guide

1. Access Method Description

If the image is deployed on WeChat Cloud Run, you can access the third-party platform management tools with one click directly from the third-party platform. The specific entry point is as follows:

Alternatively, you can obtain the service access address from "WeChat Cloud Run - Service List" and then click to access it.

2. Retrieve Login Credentials and Password

When deploying the cloud service, the system assigns a random set of login credentials and password, which are sent via in-site messages.

After logging in to the Third-Party Platform Management Tool using the credentials assigned by the system, you can reset the password to ensure system security.

3. Quick Experience of Core Features

After entering the homepage, you can quickly experience the entire third-party authorization process following the guidance.

3.1 Experience Scan Code Authorization

  • Ensure you have an official account or Mini Program with an administrator role, and add that official account or Mini Program to the Third-Party Platform's "Authorized Test Official Account/ Mini Program List".
  • Then, copy the PC authorization link to your browser and open it to see the authorization code. Scan the QR code with WeChat to complete the authorization.

Note: The copied authorization link can be integrated into actual business scenarios by developers, eliminating the need for redundant development.

3.2 Authorized Account Management

After completing authorization via QR code scanning, the authorized accounts will automatically appear in the Authorized Account Management module, where you can view and manage them.

3.3 Managed Development Mini Program Management

4. Development and Debugging

After completing the core functionality experience, you can proceed with message pushing and API debugging.

4.1 Message Viewing

To facilitate developers in testing whether messages pushed from the platform have been received and to inspect the message body content, messages can be quickly viewed via the management tools.

4.2 Token Generation

You must configure the third-party platform Secret in System Management to obtain the component_access_token.

Note: This management tool is privately deployed to the developer's cloud hosting environment, so the official team cannot access or store the Secret. However, since the Secret is sensitive information, developers must ensure it is stored securely.

You can obtain the third-party platform's Secret as follows:

After configuration, you can obtain the Token with a single click. An online debugging tool will be provided subsequently.

5. Message Forwarder

After the business service is developed and deployed, you can configure message forwarding in WeChat Mini Program Management.

5.1 Forwarding Pushed Information to the Authorized Event URL

The third-party platform account created by a service provider can receive event information that WeChat officially pushes exclusively to the service provider through "Authorized Event Configuration". Some examples are as follows:

  1. component_verify_ticket

  2. Authorization Change Notification

  3. Agency Registration Mini Program Event

If the service provider's business system needs to receive this type of event information, you can distinguish it using infoType. Note that strict case sensitivity is required. Taking the successful authorization notification as an example, infoType must be set to authorized. Setting it to Authorized will not work.

After completing the configuration, developers can perform a connectivity test:

If forwarding is no longer required, you can disable the forwarder:

5.2 Forwarding Pushes to the Message and Event URL

Third-party platform accounts created by service providers can receive events or messages pushed by WeChat to Official Accounts or Mini Program via "Message and Event Configuration". Examples include:

  1. Nickname Audit Result Event

  2. Code Audit Result Event

  3. Delivery Order Status Update Notification Event

  4. Official Account Standard Message

If the service provider's business system needs to receive such event information, it can be distinguished by MsgType. Note that it is case-sensitive. If MsgType is Event, the Event name must be further specified, for example, weapp_audit_success.

6. proxy Configurer

Weiguanjia supports proxy configuration. Once enabled, the proxy can transparently forward external requests to internal business services, thereby integrating Weiguanjia with other business systems.

III. Integration with Business Systems

Integrate with the service provider's business system without modifying the code of the official service. For detailed development and integration guidelines, see Integrating Wei Guanjia with Business Systems.

4. Secondary Development

If the features of the official services do not meet the individualized needs of service providers, developers can refer to the Official Service Secondary Development Guide.

Go to the project code, its directory structure is as follows:

V. Updated Versions

5.1 Download the zip package

Go to the project address to download the zip archive; or execute git clone git@github.com:WeixinCloud/wxcloudrun-wxcomponent.git.

5.2 Upload Zip Package

Log in to WeChat Cloud Hosting to create a new release, and select "Manually upload code package". Currently, logging in to WeChat Cloud Hosting is only supported via "Third-Party Platform - Details - Cloud Services - Go to WeChat Cloud Hosting".

5.3 Publish

Before publishing, check whether the environment variables are correctly configured in the service settings. The required environment variables are MYSQL_ADDRESS, MYSQL_PASSWORD, MYSQL_USERNAME, and WX_APPID.

After confirming everything is correct, click Publish. Wait for a few minutes. Once deployment is complete, re-enter the management tool to view the contents of the new version.

VI. Frequently Asked Questions

How are costs calculated when using this tool?

Deploying this management tool on WeChat Cloud Hosting generates services and databases. For the related billing policy, please refer to WeChat Cloud Hosting Product Billing Description.

How can I stop using this tool to avoid further charges?

If you no longer wish to use this tool, you can log in to WeChat Cloud Hosting and delete the environment. Once deleted, no further charges will be incurred.

What should I do if the Ticket is empty or the WeChat token is empty after configuring the Secret?

This occurs because new accounts need to wait for 10 minutes before the platform starts pushing the Ticket and the WeChat token.

How do I update the service after an official image version update?

Go to WeChat Cloud Hosting, create a new version, and deploy the service. For detailed instructions, refer to Section V.

How can I redeploy and use the service after deletion?

Go to WeChat Cloud Hosting, create a new version, and deploy the service. For detailed instructions, refer to Section V. Additionally, please note the following:

  • If the Cloud Hosting environment has been deleted, you must go to "Third-Party Platform - Cloud Services," navigate to Cloud Hosting, and re-activate the environment.
  • Follow the instructions in the open-source code repository or Section VI below to create a new service and deploy the code.
  • When manually creating a new service and deploying it, you must supplement the following environment variables in "Service Settings" to ensure proper usage. Otherwise, it may cause a failure to connect to the database, leading to deployment failure.
    • MYSQL_ADDRESS: The internal network address of the database
    • MYSQL_PASSWORD: The password of the database
    • MYSQL_USERNAME: The username of the database
    • WX_APPID: The AppID of the third-party platform
  • If there are installation issues during deployment, first disable "Cloud Call - Open API Service." After deployment is complete, re-enable it and trigger a deployment once. Configure the open API service interfaces as follows:
/cgi-bin/component/api_get_authorizer_list
/cgi-bin/component/api_get_authorizer_info
/cgi-bin/component/api_create_preauthcode
/cgi-bin/component/api_authorizer_token
/cgi-bin/component/api_component_token
/cgi-bin/component/api_query_auth
/cgi-bin/media/upload
/cgi-bin/componentloginpage
/wxa/submit_audit
/wxa/get_latest_auditstatus
/wxa/getvisitstatus
/wxa/getversioninfo
/wxa/getwxacodeunlimit
/wxa/get_qrcode
/wxa/gettemplatelist
/wxa/undocodeaudit
/wxa/speedupaudit
/wxa/commit
/wxa/release
/wxa/change_visitstatus
/wxa/revertcoderelease
/wxa/get_page
/wxa/get_category
  • After successful execution, you need to configure the Secret information for the third-party platform in "System Management - Secret and Password Management." After deployment, configure the corresponding push authorization path in the third-party platform (if it cannot be changed, go to "Development Mode" to switch to Traditional Mode, and then return to "Development Materials" to modify it).

Domain name for initiating login authorization: Directly configure the running domain name of the Service Provider's Micro-Manager. Configure the push path as shown in the figure, and enter your own Cloud Hosting environment and service name.

7. Changelog

v2.1.0

Release Date: 2022-04-14

  • Third-party Development Mini Program Management: Perform operations such as submitting code, submitting for review, and submitting for release.

v2.0.0

Release date: 2022-03-09

  • Added message forwarder feature: Supports receiving messages pushed by WeChat official and forwarding them to internal business services. By adding forwarding rules, messages from different scenarios can be routed to backend services, facilitating better integration with business logic.
  • Added proxy configuration feature: When proxy is enabled, external requests can be transparently forwarded to internal business services, enabling the connection between WeChat Assistant and other business systems.

v1.1.1

Release date: 2022-01-18

  • Added product experience guide on the homepage.
  • Optimized the generation method for authorization links.
  • Bugfix for H5 authorization links.

v1.0

Release Date: 2021-12-31

  • First version of features released.