123456789101112131415161718192021 |
- <?php
- namespace app\components\OpenAuth\core;
- use app\common\helpers\Session;
- use \Exception;
- use Yii;
- class DDclient {
- function __construct($access_token, $refresh_token = NULL) {
- $this->oauth = new DD($access_token, $refresh_token);
- }
- //获取用户信息
- public function get_user_info()
- {
- $url = "https://api.dingtalk.com/v1.0/contact/users/me/";
- $header['x-acs-dingtalk-access-token'] = $this->oauth->access_token;
- $result = https_request($url,null,null,$header);
- return $result;
- }
- }
|