PHP code example of mengxiao-ac / easy-feishu
1. Go to this page and download the library: Download mengxiao-ac/easy-feishu library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mengxiao-ac / easy-feishu example snippets
use EasyFeishu\Foundation\Application;
$options = [
'debug' => false,
'app_id' => 'cli_xxxxxx',
'app_secret' => 'xxxxxxxxxxxxxxxxxxx',
'encrypt_key' => 'xxxxxx',
'log' => [
'file' => __DIR__.'/../logs/'.date('Y-m-d').'.log',
'level' => 'debug',
],
// ...
];
$app = new Application($options);
$server = $app->server;
$departments = $app->contact->getDepartments();