Skip to content

EasyWeChat

A PHP SDK for building WeChat (WeChat/Weixin) integrations such as official accounts.

Stars
10.4k
Forks
2.4k
Licence
MIT
Language
PHP
Last update
3 months ago
Type
Library

What it is

EasyWeChat is a PHP library that wraps WeChat's developer APIs so PHP programs can work with WeChat features without handling raw requests themselves. The README's example sets up an official account server that replies to incoming messages. It is maintained as an open-source product by the w7 (微擎) company.

  • Run a WeChat official account server that answers incoming messages with a fixed reply
  • Use the OfficialAccount Application class as the entry point for WeChat server integration

Great for

  • PHP developers building WeChat official account backends
  • Teams already running PHP web applications that need WeChat messaging
  • Developers who want a packaged SDK instead of writing WeChat API calls by hand

Not ideal for

  • Non-PHP projects, since the library is written for PHP (README requires PHP >= 8.0.2)
  • Non-developers looking for a ready-made app; this is code you must integrate
  • Projects needing WeChat features beyond what the README's official account example covers, which should be verified in the docs first
Step-by-step guide: how to use EasyWeChatInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: PHP >= 8.0.2 · Composer >= 2.0

    Install via Composer

    composer require w7corp/easywechat
  2. 2

    Run it

    • Install PHP 8.0.2 or newer and Composer 2.0 or newer
    • Run composer require w7corp/easywechat in your project folder
    • Create a config array with your WeChat app_id, secret, aes_key and token
    • Create an Application instance and call getServer()->serve() to handle requests
  3. 3

    Get the most out of it

    • Read the official documentation at easywechat.com for the full list of modules beyond the basic server example
    • Follow the GitHub discussions board for questions and usage patterns
    • Check the release notes for the latest stable version (6.20.0 per metadata) before upgrading

Downloads

Strengths

  • Installs with a single Composer command, per the README
  • MIT license permits use in commercial and private projects
  • Documentation site and discussions board are linked from the README

Trade-offs

  • README is written primarily in Chinese and the example is brief, so non-Chinese readers may need the official docs
  • Requires a configured WeChat account (app_id, secret, token, AES key) before it does anything useful

How it compares

ProjectStarsTypeLevelUpdatedBest for
easywechat (this)10.4kLibraryintermediate3 months agoPHP developers building WeChat official account backends
guzzle23.4kLibraryintermediate11 days agoPHP developers who need to call external REST or web service APIs
monolog21.4kLibraryintermediate5 days agoPHP developers who need structured logs from an application
flysystem13.6kLibraryintermediate1 months agoPHP developers who need to store files in more than one place
uuid12.6kLibrarybeginner2 months agoPHP developers who need unique IDs for database records or API objects
EmailValidator11.6kLibrarybeginner4 days agoPHP developers adding email checks to sign-up or contact forms

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.