PHPackages                             x2nx/wework-finance-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. x2nx/wework-finance-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

x2nx/wework-finance-sdk
=======================

Enterprise WeChat Conversation Content Archive PHP Extension

v1.0.6(1y ago)1115MITPHPPHP &gt;=5.6

Since Dec 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/x2nx/wework-finance-sdk)[ Packagist](https://packagist.org/packages/x2nx/wework-finance-sdk)[ Docs](https://github.com/x2nx/wework-finance-sdk)[ RSS](/packages/x2nx-wework-finance-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (8)Used By (0)

Enterprise WeChat Conversation Content Archive PHP Extension
============================================================

[](#enterprise-wechat-conversation-content-archive-php-extension)

**English** · [简体中文](./README.zh-CN.md)

#### This extension package provides PHP access capabilities for the WeChat Enterprise session content archiving service, supporting the following three access methods:

[](#this-extension-package-provides-php-access-capabilities-for-the-wechat-enterprise-session-content-archiving-service-supporting-the-following-three-access-methods)

1. API method - start the API service through Docker (API based on GO)
2. FFI method - call the official SDK through the PHP FFI extension
3. Extension method - use the compiled PHP native extension

#### Environmental requirements

[](#environmental-requirements)

- If you use the FFI method, you need to install the PHP FFI extension
- If you use the extension method, you need to compile and install the extension
- PHP &lt;= 7.3 It is recommended to use the API or native extension method to connect
- PHP &gt;= 7.4 It is recommended to use the FFI or API method to connect

#### Functional features

[](#functional-features)

- Support for obtaining session archive content
- Support for decrypting session messages
- Support for obtaining media files
- Support for multiple message types: text, pictures, voice, video, files, etc.
- Support for specifying multiple private keys for decryption by version number
- The data structure is consistent, you only need to set the SDK method to use it quickly

Getting Started
---------------

[](#getting-started)

Install using Composer:

```
composer require x2nx/wework-finance-sdk
```

Code Example:

```
$sdk = new \X2nx\WeworkFinance\SDK([
    // 'api_mase'=>'Custom API Service Address' is available when provider=API
    'provider' => 'api', // ffi ext api three methods optional default api method
    'corpid' => 'xxxxxxxxxxxxxxxxxxxx',
    'secret' => 'xxxxxxxxxxxxxxxxxxxx',
    'private_keys' => [
        'version number' => 'decryption private key'
    ]
]);

$data = $sdk->getDecryptChatData(0, 50, 3);

```

Build toolkit
-------------

[](#build-toolkit)

The `build` directory contains three scripts to help build and manage the SDK:

1. `build.sh` - Build Docker image for API service

```
# Enter directory
cd build/docker/
#Build API service Docker image for installation and uninstallation
./build.sh install
# Uninstall image and container
./build.sh uninstall
# You can also use our Docker Hub image to start with just one click
docker run -itd --restart=always --privileged=true -h weworkmsg --name=weworkmsg -e WECOMMSG_HOST=0.0.0.0 -p 7149:7149 x2nx/wework-finances-api:v1.0.0
```

2. `ffi.sh` - Compile PHP native FFI extension

```
# Enter directory
cd build/
# Build SDK library file for FFI mode Usage example: ./ffi.sh 7.4.33
./ffi.sh {php version}
```

3. `wxwork_finance_sdk.sh` - Compile PHP wxwork\_finance\_sdk extension

```
# Enter directory
cd build/
# Compile and install PHP Extension
./wxwork_finance_sdk.sh
```

Choose the appropriate build script based on your preferred access method:

- For API mode: simple and fast one-click start, no need to consider environment and other issues
- For extension mode: use PHP7.4 and below, compiling extensions is more cumbersome
- For FFI mode: use PHP7.4 and above
- Due to compatibility issues between alpine and glibc, the extension compilation and installation will fail to run after successful installation. It is recommended to use the `API` method
- If the PHP environment is installed, the script can run normally

Participate and contribute
--------------------------

[](#participate-and-contribute)

We warmly welcome contributions in various forms. If you encounter any code or environment configuration issues during use, please feel free to submit feedback on GitHub \[Issues\] \[GitHub issues link\]. We also welcome your suggestions on features and user experience to help us continuously improve.

Thanks and Related Links
------------------------

[](#thanks-and-related-links)

-
-
-

Copyright and license
---------------------

[](#copyright-and-license)

The MIT License (MIT)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance40

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

7

Last Release

502d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb3da60bee38ec8f65306d59424e049fad8bdd58a5214bd10d7b749f02fee3c1?d=identicon)[OKXaas](/maintainers/OKXaas)

---

Top Contributors

[![okxaas](https://avatars.githubusercontent.com/u/15893123?v=4)](https://github.com/okxaas "okxaas (9 commits)")

### Embed Badge

![Health badge](/badges/x2nx-wework-finance-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/x2nx-wework-finance-sdk/health.svg)](https://phpackages.com/packages/x2nx-wework-finance-sdk)
```

###  Alternatives

[jmosbech/sticky-table-headers

jQuery sticky table headers plugin

9074.9k](/packages/jmosbech-sticky-table-headers)[tomnomnom/phpwol

Wake On LAN for PHP

114.5k](/packages/tomnomnom-phpwol)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
