PHPackages                             ritaswc/dingtalk-robot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ritaswc/dingtalk-robot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ritaswc/dingtalk-robot
======================

Easy to send dingtalk robot message

1.0.4(5y ago)37.9k↑50%MITPHP

Since Nov 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ritaswc/php-dingtalk-robot)[ Packagist](https://packagist.org/packages/ritaswc/dingtalk-robot)[ Fund](https://blog.yinghualuo.cn/blog/2020/11/sponsor.png)[ RSS](/packages/ritaswc-dingtalk-robot/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

php-dingtalk-robot
==================

[](#php-dingtalk-robot)

Easy to send dingtalk robot message without any other PHP libraries

Usage
-----

[](#usage)

```
composer require ritaswc/dingtalk-robot
```

Send Message
------------

[](#send-message)

```
$accessToken = '2d1bf0b300...';
$secret = 'SEC7a90caf...';
$isAtAll = false;
$atMobiles = ['130****6666', '188****8888'];
$robot = new \Ritaswc\DingtalkRobot\DingtalkRobot($accessToken, $secret);

$robot->sendText('PHP is the best language in the world!', $isAtAll, $atMobiles);

$robot->sendLink('Charles的小星球',
    '基于wordpress...',
    'https://blog.yinghualuo.cn',
    '');

$robot->sendMarkdown(
    '杭州天气',
    '#### 杭州天气 @150XXXXXXXX \n> 9度，西北风1级，空气良89，相对温度73%\n> ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n> ###### 10点20分发布 [天气](https://blog.yinghualuo.cn) \n',
    $isAtAll,
    $atMobiles
);

$robot->sendSingleActionCard(
    '乔布斯 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身',
    '![screenshot](https://gw.alicdn.com/tfs/TB1ut3xxbsrBKNjSZFpXXcXhFXa-846-786.png)
 ### 乔布斯 20 年前想打造的苹果咖啡厅
 Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
    '阅读全文',
    'https://blog.yinghualuo.cn',
    '0'
);

$robot->sendMultiActionCard(
    '乔布斯 20 年前想打造一间苹果咖啡厅，而它正是 Apple Store 的前身',
    '![screenshot](https://gw.alicdn.com/tfs/TB1ut3xxbsrBKNjSZFpXXcXhFXa-846-786.png)
 ### 乔布斯 20 年前想打造的苹果咖啡厅
 Apple Store 的设计正从原来满满的科技感走向生活化，而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
    '0',
    [[
        'title'     => '内容不错',
        'actionURL' => 'https://blog.yinghualuo.cn'
    ], [
        'title'     => '不感兴趣',
        'actionURL' => 'https://www.dingtalk.com'
    ]]
);

$robot->sendFeedCard([
    [
        'title'      => '时代的火车向前开',
        'messageURL' => 'https://www.dingtalk.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI',
        'picURL'     => 'https://gw.alicdn.com/tfs/TB1ayl9mpYqK1RjSZLeXXbXppXa-170-62.png',
    ], [
        'title'      => '时代的火车向前开2',
        'messageURL' => 'https://www.dingtalk.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI',
        'picURL'     => 'https://gw.alicdn.com/tfs/TB1ayl9mpYqK1RjSZLeXXbXppXa-170-62.png',
    ]
]);
```

Author Blog
-----------

[](#author-blog)

[Charles的小星球](https://blog.yinghualuo.cn)

Dingtalk Document
-----------------

[](#dingtalk-document)

[自定义机器人开发](https://developers.dingtalk.com/document/app/custom-robot-access)

License
-------

[](#license)

MIT

Sponsor
-------

[](#sponsor)

[![QrCode](https://camo.githubusercontent.com/2feecdc6c38e688236f6833db15feb341f37876ea120e86e756845226b9d15d2/68747470733a2f2f626c6f672e79696e676875616c756f2e636e2f626c6f672f323032302f31312f73706f6e736f722e706e67)](https://camo.githubusercontent.com/2feecdc6c38e688236f6833db15feb341f37876ea120e86e756845226b9d15d2/68747470733a2f2f626c6f672e79696e676875616c756f2e636e2f626c6f672f323032302f31312f73706f6e736f722e706e67)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

5

Last Release

2000d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d573b192b6e1ea26030ba9b8830fd42baa06eae328898442ef55ac24e5101c4?d=identicon)[ritaswc](/maintainers/ritaswc)

---

Top Contributors

[![ritaswc](https://avatars.githubusercontent.com/u/15887140?v=4)](https://github.com/ritaswc "ritaswc (9 commits)")

### Embed Badge

![Health badge](/badges/ritaswc-dingtalk-robot/health.svg)

```
[![Health](https://phpackages.com/badges/ritaswc-dingtalk-robot/health.svg)](https://phpackages.com/packages/ritaswc-dingtalk-robot)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
