PHP code example of normalcoder / easy-feishu

1. Go to this page and download the library: Download normalcoder/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/ */

    

normalcoder / 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();