public static function getAccessToken()
    {
        $oauthClientParams = ArrayHelper::getValue(\Yii::$app->params, 'oauth');
        $oauthClient = new Oauth2Client($oauthClientParams);
        $code = $oauthClient->authorize();
        $token = $oauthClient->fetchAccessToken($code);
        $accessToken = ArrayHelper::getValue($token, 'access_token');
        return $accessToken;
    }