PHPackages                             asialong/pinduoduo-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. [API Development](/categories/api)
4. /
5. asialong/pinduoduo-sdk

ActiveLibrary[API Development](/categories/api)

asialong/pinduoduo-sdk
======================

拼多多的php版sdk

1.1.6(4y ago)154MITPHPPHP &gt;=7.0

Since Jul 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/asialong/pinduoduo-sdk)[ Packagist](https://packagist.org/packages/asialong/pinduoduo-sdk)[ RSS](/packages/asialong-pinduoduo-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (17)Used By (0)

### 要求

[](#要求)

1. PHP &gt;= 7.0
2. **[Composer](https://getcomposer.org/)**
3. ext-curl 拓展
4. ext-json 拓展

### 安装

[](#安装)

`composer require asialong/pinduoduo-sdk`

### 使用

[](#使用)

```
use \Asialong\PinduoduoSdk\Pdd;

require __DIR__ . '/vendor/autoload.php';
$config = [
    'client_id'    => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'debug'              => true,
    'member_type'        => 'MERCHANT',//用户角色 ：MERCHANT(商家授权),H5(移动端),多多客(JINBAO),
    'redirect_uri'       => 'https://test.xxx.com/callback',
    'log'                => [
        'name'       => 'pdd',
        'file'       => __DIR__ . '/pdd.log',
        'level'      => 'debug',
        'permission' => 0777,
    ],
];
$pdd = new Pdd($config);
```

### 调用示例

[](#调用示例)

#### 调用无需授权接口示例

[](#调用无需授权接口示例)

> 多多进宝商品详情查询 pdd.ddk.goods.detail

```
$result   = $pdd->api->request('pdd.ddk.goods.detail', ['goods_id_list' => ['395581006']]);
```

#### 调用需授权接口示例

[](#调用需授权接口示例)

- 获取授权 URL

```
$url = $pdd->pre_auth->authorizationUrl();
```

- 重定向到授权页面

```
$pdd->pre_auth->authorizationRedirect();
```

- 在重定向页面，你可以获取此次授权账号的 token

```
$token = $pdd->pre_auth->getAccessToken();
//也可以通过上面得到的 refresh_token 去刷新令牌
//拼多多官方刷新令牌功能暂时无效，token失效就重新授权
//$token = $pdd->pre_auth->refreshToken($token['refresh_token']);
```

- 创建授权应用

```
$pinduoduo = $pdd->oauth->createAuthorization($token['token']);
```

> 获取当前账号下有多少推广位 pdd.ddk.oauth.goods.pid.query

```
$result   = $pdd->auth_api->request('pdd.ddk.oauth.goods.pid.query');
```

### 文档

[](#文档)

[拼多多开放平台](http://open.pinduoduo.com/) · [官方文档](http://open.pinduoduo.com/#/apidocument)

### 感谢

[](#感谢)

- [justmd5/pinduoduo-sdk](https://github.com/justmd5/pinduoduo-sdk)
- [hanson/foundation-sdk](https://github.com/Hanson/foundation-sdk)

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Recently: every ~134 days

Total

16

Last Release

1603d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.4

1.1.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3885b6d38e8213e43b3f748c51311e95a339f653be3cdd220493e0babed10bc7?d=identicon)[asialong](/maintainers/asialong)

---

Tags

sdkpinduoduoduoduoke

### Embed Badge

![Health badge](/badges/asialong-pinduoduo-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/asialong-pinduoduo-sdk/health.svg)](https://phpackages.com/packages/asialong-pinduoduo-sdk)
```

###  Alternatives

[justmd5/pinduoduo-sdk

拼多多API SDK【拼多多开放平台】.

23514.1k1](/packages/justmd5-pinduoduo-sdk)[wxm/pdd-sdk

拼多多 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

154.7k](/packages/wxm-pdd-sdk)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

223.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

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