1

我喜欢为 HipChat 创建一个 webhook,以便例如/sayhi在聊天中输入一个简单Hi的返回。

我查看了他们的 api https://www.hipchat.com/docs/apiv2/method/create_room_webhook据说可以发送 PUT 到

/v2/room/{room_id_or_name}/extension/webhook/{key}

所以我做了以下脚本

curl -d '{"name":"simpletest","url":"http://myserser/myapp/myresource",
   "pattern":"^\\/hello$","key":"my.simple.webhook","event":"room_message"}' 
   -H 'Content-Type: application/json' 
   https://our.hipchat.com/v2/room/2202432/extension
   /webhook/my.simple.webhook?auth_token=token

但运行此返回

{
 "error": {
 "code": 405,
 "message": "<p>The method is not allowed for the requested URL.</p>",
 "type": "Method Not Allowed"
 }
}

有人可以解释如何正确设置吗?谢谢你的帮助

4

1 回答 1

1

终于找到了https://developer.atlassian.com/hipchat/tutorials/building-a-simple-add-on-using-a-wizard在那里详细解释了它并且它正在工作。

最后,这是我这边的错误配置

于 2016-02-22T13:29:36.323 回答