Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
D documents
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pass
  • documents
  • Wiki
    • 接口
  • 消息

消息 · Changes

Page history
yjf created page: 接口/消息 authored Mar 25, 2019 by 叶佳菲's avatar 叶佳菲
Show whitespace changes
Inline Side-by-side
Showing with 79 additions and 0 deletions
+79 -0
  • 接口/消息.md 接口/消息.md +79 -0
  • No files found.
接口/消息.md 0 → 100644
View page @ 3c8d2951
[[_TOC_]]
### C1.发送消息
- 发送给某个用户
```javascript
POST http://${domain}/message/v2/notices HTTP/1.1
Authorization: Bearer ${token}
Content-Type: application/json
{
"to": ${sub},
"template": ${template_id},
"url": ${url*},
"data": {
${keyword}: {
"value": ${value},
"color": ${color}
}
...
}
}
```
|参数名|类型|说明|
|:---|:---|:---|
|sub|string|某个用户的ID|
|template_id|string|模板ID|
|url|string|如果需要跳转,则填写跳转地址|
|keyword|string|模板关键字|
|value|string|模板内容|
|color|color|模板内容颜色|
|其他||见`公共请求参数说明`|
- 请求参数示例
```javascript
{
"to": "6aeca60613e949f0a16e721faf9f1082",
"template": "Q57J4mJLPXxiBNTzRqkB93eB_64KLnRmAgNcoRiOMpk",
"data": {
"first": {
"value": "1",
"color": "#000"
},
"keyword1": {
"value": "2",
"color": "#000"
},
"keyword2": {
"value": "3",
"color": "#000"
},
"keyword3": {
"value": "4",
"color": "#000"
},
"keyword4": {
"value": "5",
"color": "#000"
},
"remark": {
"value": "6",
"color": "#000"
}
}
}
```
- 若发送成功则返回
```javascript
{
"code":200
}
```
Clone repository
  • Home
  • 接口
    • 交易
    • 消息
    • 用户
    • 通用券
  • 渠道
    • 微信 1基本参数
    • 微信 2商户平台配置
    • 微信 3公众号参数
    • 微信 4公众平台配置
    • 微信(服务商方式)
    • 支付宝 1基本参数
    • 支付宝 2公钥上传
    • 支付宝(服务商方式)