Description

This event is sent to the event listener URL by Flock to request the app to unfurl a list of URLs. Your app is expected to send back an Attachment object in response to this event.

{
    "name": "chat.generateUrlPreview",
    "userId": "u:cfc76545-3400-4864-892a-513a9f4ae409",
    "url": "http://example.net",
    "chat": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195",
    "messageId": "4458f0a9-eca7-4efb-8560-2a0fd3ac858d"
}

Event Attributes

Attribute NameAttribute TypeAttribute Description
userIdStringUser identifier
urlString (URL)The URL to unfurl
toStringId of the user or group to whom the message was sent
messageIdStringId of the message

Response

The app should respond back with an Attachment.

{
    "attachment": {
        "title": "<content title>",
        "description": "<content description>",
        "url": "<the requested url>",
        "views": {
            "flockml": "<flockml>some <b>flockml</b> content</flockml>"
        }
    }
}