# 开发文档

nohup java -jar tsl_data-1.1-exec.jar >output.log 2>&1 &

## 钉钉API相关汇总

[钉钉api地址](https://open.dingtalk.com/document/orgapp/api-overview)

### 获取AccesstokenAPI

- [获取企业内部应用的accessToken](https://open.dingtalk.com/document/orgapp/obtain-the-access_token-of-an-internal-app)

```http
POST https://api.dingtalk.com/v1.0/oauth2/accessToken HTTP/1.1
Content-Type:application/json

{
  "appKey" : "dingothmdq6opv6hjrm5",
  "appSecret" : "SeoyAwUnzFIFY4j4CX089HJ0i-pj1BIzByB3AZcnbCQaq94lZvazFpfEGGQwPznc"
}
```

- [获取企业内部应用的access_token--旧版api](https://open.dingtalk.com/document/orgapp/obtain-orgapp-token)

```http
GET https://oapi.dingtalk.com/gettoken?appkey=dingothmdq6opv6hjrm5&appsecret=SeoyAwUnzFIFY4j4CX089HJ0i-pj1BIzByB3AZcnbCQaq94lZvazFpfEGGQwPznc
```

- [机器人发送群聊消息](https://open.dingtalk.com/document/orgapp/the-robot-sends-a-group-message)

```http
POST https://api.dingtalk.com/v1.0/robot/groupMessages/send HTTP/1.1
x-acs-dingtalk-access-token:String
Content-Type:application/json

{
  "msgParam" : "String",
  "msgKey" : "String",
  "openConversationId" : "String",
  "robotCode" : "String",
}
```

### 上传媒体文件

[上传媒体文件](https://open.dingtalk.com/document/orgapp/upload-media-files)

### 参数概念及获取方式

#### appKey appSecret

应用key 和Secret

#### conversationId

唯一标识一个群

<https://open-dev.dingtalk.com/apiExplorer?spm=ding_open_doc.document.0.0.afb839b7W85NCP#/jsapi?api=biz.chat.chooseConversationByCorpId>
