PHPackages                             westng/xhs-marketing-api - 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. [API Development](/categories/api)
4. /
5. westng/xhs-marketing-api

ActiveLibrary[API Development](/categories/api)

westng/xhs-marketing-api
========================

小红书开放平台 聚光 MarketingApi SDK

1.0.4(1y ago)020MITPHPPHP &gt;=5.4.0

Since Sep 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/westng/xhs-marketing-api)[ Packagist](https://packagist.org/packages/westng/xhs-marketing-api)[ RSS](/packages/westng-xhs-marketing-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

ads-marketing-api
=================

[](#ads-marketing-api)

- 小红书商业开放平台 聚光 MARKETING API SDK

Installation
------------

[](#installation)

```
composer require westng/xhs-marketing-api

```

Requirements
------------

[](#requirements)

- PHP 5.4 +

Directory Structure
-------------------

[](#directory-structure)

```
Authentication/           小红书OAuth2.0授权
core/                          SDK核心

```

Example
-------

[](#example)

```
// 获取token, refresh_token
$auth = new XHSSdk\XHSAuth(APPID, SECRET);
print_r($auth->getAccessToken(AUTH_CODE));

// 刷新token
print_r($auth->refreshToken(REFRESH_TOKEN));
```

```
// 调用示例
$client = new XHSSdk\XHSClient(TOKEN);
$args = [];
$req = $client::AdvertisingDelivery()->campaignGet()->setArgs($args)->send();
var_dump($req->getBody());
```

Method introduction
-------------------

[](#method-introduction)

账户服务执行方式获取计划流水接口未开发获取账户日预算余额接口未开发获取账户流水接口未开发账户白名单未开发投放管理执行方式推广计划执行方式----------------创建计划未开发编辑计划未开发修改计划状态未开发查询计划未开发--------------------推广单元执行方式----------------创建单元未开发编辑单元未开发修改单元状态未开发获取单元列表接口未开发--------------------推广创意执行方式----------------创建笔记创意未开发创建落地页创意未开发创建程序化创意未开发编辑创意未开发修改创意状态未开发创意查询未开发数据报表执行方式素材管理执行方式工具执行方式License
-------

[](#license)

licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)

xhs-marketing-api
=================

[](#xhs-marketing-api)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity6

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 ~0 days

Total

5

Last Release

594d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3317e153eb11ce2394e6c30b90db0e6dd33ee2fcf2c6d57b222ba68b49ab93b5?d=identicon)[westng](/maintainers/westng)

---

Top Contributors

[![westng](https://avatars.githubusercontent.com/u/57742335?v=4)](https://github.com/westng "westng (22 commits)")

---

Tags

sdkphp-sdkmarketing-api

### Embed Badge

![Health badge](/badges/westng-xhs-marketing-api/health.svg)

```
[![Health](https://phpackages.com/badges/westng-xhs-marketing-api/health.svg)](https://phpackages.com/packages/westng-xhs-marketing-api)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

213.2k1](/packages/qwen-php-qwen-php-client)[leapfu/cloud-printer

高扩展性云小票打印SDK，支持飞鹅云、芯烨云、易联云、快递100、映美云、佳博云、中午云、优声云等主流云打印服务，兼容 Laravel、ThinkPHP 等主流框架，统一API，易集成，易扩展。

104.5k](/packages/leapfu-cloud-printer)

PHPackages © 2026

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