Download the PHP package geek/dingtalk without Composer

On this page you can find all versions of the php package geek/dingtalk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dingtalk

dingtalk-sdk

钉钉企业开发服务端SDK

build=passing Latest Version on Packagist Total Downloads

钉钉开放了丰富的服务端接口能力,开发者可以借助这些接口能力,实现企业系统与钉钉的集成打通。
官方文档地址:https://open-doc.dingtalk.com/microapp/serverapi2

安装

使用composer安装

推荐使用composer安装:

或者在composer.json里追加:

手动安装到vendor目录

先手动下载SDK到任意目录:

如果已经存在基于composer生成的vendor目录,直接添加如下到composer.json:

如果还没有使用过composer生成vendor目录,手动生成:
1、先初始化:

输入你的项目名,例如yujc/demo

2、在生成的composer.json里添加:

然后移动下载的SDK到vendor目录,执行:

输出 Generating autoload files 。

此时代码里需要加上:

不使用composer

如果确实不想使用composer,那就自己实现自动加载:

示例:

使用示例

首先需要到钉钉管理后台获取开发账号。详解:https://open-doc.dingtalk.com/microapp/serverapi2/hfoogs

SDK需要配置:

使用示例:

接口

获取部门列表

获取部门详情

获取部门用户列表(详情)

获取用户信息详情

发送群消息

钉钉没有提供直接向群里发送消息的功能。我们可以在管理后台添加一个虚拟员工,然后用该员工创建一个钉钉群,之后就可以直接发消息了。

1、创建群会话

2、根据群会话id发送消息

发送机器人消息

需要先获取access_token:打开任意一个钉钉群设置,在机器人管理页面选择“自定义”机器人,输入机器人名字并选择要发送消息的群。如果需要的话,可以为机器人设置一个头像。点击“完成添加”,完成后会生成Hook地址。 hook地址里会有access_token。

业务事件回调

当钉钉内的企业发生一些业务变更时,会通过业务事件回调URL通知企业或者第三方应用,实现数据同步的功能。目前支持的业务事件包含:通讯录相关事件,群会话相关事件,签到相关事件,审批相关事件。

首先需要注册回调:

然后实现回调url对应接口的功能:


All versions of dingtalk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package geek/dingtalk contains the following files

Loading the files please wait ....