所以我们使用 Flowdock Push API 已经有一段时间了。我们一直在使用它从我们的持续集成服务器(电气指挥官)推送消息,它运行得非常好。它已集成到今天的 powershell 脚本中。
现在我被告知 PUSH API 已被弃用,并且将在“某天”连同对 REST API 消息功能的引用一起被删除。
按照文档,我已经能够将来自我的个人 API 令牌的消息直接添加到聊天中。但是,当我尝试使用流 API 令牌向收件箱添加消息时,我不断收到 404
我正在使用 fiddler 的 compose 功能来摆弄(哈!)来自 dox 的示例(我已经将其匿名化了一点):
POST https://api.flowdock.com/MYORGANIZATION/MYFLOW/mesages
User-Agent: Fiddler
Host: api.flowdock.com
Content-Length: 593
Content-Type: application/json
Accept: application/json
{
"flow_token": "MYFLOWS API TOKEN",
"event": "activity",
"author": {
"name": "anttipitkanen",
"avatar": "https://avatars.githubusercontent.com/u/946511?v=2"
},
"title": "Opened pull request",
"thread_id": "WT5yWsIpdvUPxP07lfgQDmLoGQQ",
"external_thread_id": "github:component:pr:42",
"thread": {
"title": "Fix bug in thread API",
"body": "Body with <b>HTML<b> formatting",
"external_url": "https://github.com/flowdock/component/pull/42",
"status": {
"color": "green",
"value": "open"
}
}
}
原始响应是:
HTTP/1.1 404 Not Found
Date: Thu, 08 Oct 2015 10:02:34 GMT
Status: 404 Not Found
Content-Type: application/json
X-Request-Id: ab39438c-07b7-48bf-bde8-c3b29478094d
X-Runtime: 0.007442
Strict-Transport-Security: max-age=31557600
X-Server-Id: 3c4883af38147558374983c6d90b2bb9badb86d4
Vary: Accept-Encoding
Transfer-Encoding: chunked
20
{"message":"Resource not found"}
0
flow_token 是我的流程的 API 令牌吗?还是我必须注册的开发令牌?
这并不意味着作为应用程序工作,我只是不想将构建和部署的状态推送给其他开发人员。