Both the POST data and the expected response data are application/json
If a user posts one of the following in the channel:
!example test 1 2 3
BotName test 1 2 3
BotName me test 1 2 3
Our server will post to your URL with the following JSON (for Campfire):
{
"service": "campfire",
"text": "example test 1 2 3",
"from": {
"id": 1234,
"name": "Test Person",
"email": "[email protected]",
"admin": true
},
"room": {
"id": 5678,
"name": "Bot Test Room",
"topic": "!curse bots",
"locked": false
},
"date": 1317876136618
}
And here is example JSON for IRC (more information like ops/voice information coming soon):
{
"service": "irc",
"text": "example test 1 2 3",
"from": {
"name": "wadey"
},
"room": {
"name": "#botriot"
},
"date": 1317876602358
}
(we plan to add more information in the future. We won't change fields once they are added though to maintain compatiblity).
Your server should respond with a 200 OK
code, and one of the following:
{"speak": "Message to speak"}
{"paste": "Message to paste"}
{"image": "http://yourcool/image.png"}
You enable webhooks by using running !webhook command in your channel.
!webhook <url>
To disable webhooks, use:
!webhook off