PHP code example of dtyq / easy-dingtalk
1. Go to this page and download the library: Download dtyq/easy-dingtalk 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/ */
dtyq / easy-dingtalk example snippets
use Dtyq\EasyDingTalk\OpenDevFactory;
$factory = new OpenDevFactory([
'app_key' => 'your_app_key',
'app_secret' => 'your_app_secret',
]);
// 获取访问令牌
$accessToken = $factory->getAccessToken();
// 使用其他接口...
return [
Dtyq\EasyDingTalk\OpenDevFactory::class => function (ContainerInterface $container) {
return new Dtyq\EasyDingTalk\OpenDevFactory([
'app_key' => config('dingtalk.app_key'),
'app_secret' => config('dingtalk.app_secret'),
]);
},
];
bash
composer analyse