PHPackages                             yj\_out\_api/out - 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. yj\_out\_api/out

ActiveLibrary[API Development](/categories/api)

yj\_out\_api/out
================

予集对外接口SDK

v2.0.1(3y ago)333MITPHPPHP &gt;=7.1.0

Since Jan 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SunRain-github/yjOutApi)[ Packagist](https://packagist.org/packages/yj_out_api/out)[ RSS](/packages/yj-out-api-out/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (9)Used By (0)

yjOutApi
========

[](#yjoutapi)

予集对外接口SDK

安装
--

[](#安装)

```
composer require yj_out_api/out
```

demo.php
--------

[](#demophp)

#### 微信官方接口获取用户的 unionid 和 openid

[](#微信官方接口获取用户的-unionid-和-openid)

```
$jsonData = '{
    "nickName": "微信用户",
    "gender": 0,
    "language": "",
    "city": "",
    "province": "",
    "country": "",
    "avatarUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132",
    "is_demote": true,
    "session_key": "Gs9r6GK/98Nz6Hx96QaEaw==",
    "openid": "ofz_K4lbnbma5PQ_gJXb5IITZYtA",
    "unionid": "ofB9I5r5j8lZzLS5v0zB0zy1sNPg"
}';

```

#### 代码示例

[](#代码示例)

```
