Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After web hook is created you can post JSON data to create a new activity on channel. Web hook URL contains required all required information does not need any authentication.

...

Code Block
POST /hooks/channels/f923d83a-3350-42d0-b9cb-620032730294/8459b574-62ea-4ea7-bbae-a132fbfee5df
Host: my.emakin.com
Content-Type: application/json

{
	"text" : "my message"
}

Image Modified


As another example you can post following JSON to send a message with attachments. 

...

Code Block
POST /hooks/channels/f923d83a-3350-42d0-b9cb-620032730294/8459b574-62ea-4ea7-bbae-a132fbfee5df
Host: my.emakin.com
Content-Type: application/json

{
	"text" : "my message",
    "attachment" : [
    {
        "@type": "file",
        "displayName": "my file",
        "ext": "txt",
        "url": "http://myserver/myfile"
    },
    {
        "@type": "link",
        "url": "http://www.google.com",
        "displayName": "http://www.google.com"
    }]
}

Image Modified