Packages

A Slack Web & Real Time Messaging API client.

Current section

Files

Jump to
slack_kit priv docs methods chat.unfurl.json
Raw

priv/docs/methods/chat.unfurl.json

{
"args": {
"channel": {
"desc": "Channel ID of the message. Both `channel` and `ts` must be provided together, _or_ `unfurl_id` and `source` must be provided together. Required for public channels. Both `unfurl_id` and `source` must be provided together, _or_ `channel` and `ts` must be provided together. The first time this method is executed with a particular `ts` and `channel` (or `unfurl_id` and `source`) combination, the valid `unfurls` attachments you provide will be attached to the message. Subsequent attempts with the same `ts` and `channel` values will modify the same attachments, rather than adding more. The `ts` value you supply must correspond to a message in the specified `channel`.",
"required": false,
"type": "string"
},
"source": {
"desc": "The source of the link to unfurl. The source may either be `composer`, when the link is inside the message composer, or `conversations_history`, when the link has been posted to a conversation. _Acceptable values:_ `composer` `conversations_history`. Both `unfurl_id` and `source` must be provided together, _or_ `channel` and `ts` must be provided together. The first time this method is executed with a particular `ts` and `channel` (or `unfurl_id` and `source`) combination, the valid `unfurls` attachments you provide will be attached to the message.",
"example": "composer",
"required": false,
"type": "string"
},
"ts": {
"desc": "Timestamp of the message to add unfurl behavior to. Required for public channels. Both `unfurl_id` and `source` must be provided together, _or_ `channel` and `ts` must be provided together. The first time this method is executed with a particular `ts` and `channel` (or `unfurl_id` and `source`) combination, the valid `unfurls` attachments you provide will be attached to the message. Subsequent attempts with the same `ts` and `channel` values will modify the same attachments, rather than adding more. The `ts` value you supply must correspond to a message in the specified `channel`.",
"required": false,
"type": "string"
},
"unfurl_id": {
"desc": "The ID of the link to unfurl. Both `unfurl_id` and `source` must be provided together, _or_ `channel` and `ts` must be provided together. Both `unfurl_id` and `source` must be provided together, _or_ `channel` and `ts` must be provided together. The first time this method is executed with a particular `ts` and `channel` (or `unfurl_id` and `source`) combination, the valid `unfurls` attachments you provide will be attached to the message.",
"example": "Uxxxxxxx-909b5454-75f8-4ac4-b325-1b40e230bbd8",
"required": false,
"type": "string"
},
"unfurls": {
"desc": "URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels. The first time this method is executed with a particular `ts` and `channel` (or `unfurl_id` and `source`) combination, the valid `unfurls` attachments you provide will be attached to the message.",
"required": false,
"type": "string"
},
"user_auth_blocks": {
"desc": "Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Or, you can send an ephemeral message to that user by providing a simple string-based `user_auth_message` value or JSON array of blocks using `user_auth_blocks`. Using both properties shows the `user_auth_message` in a notification and the `user_auth_blocks` in the ephemeral message.",
"required": false
},
"user_auth_message": {
"desc": "Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, `Not now` or `Never ask me again`. Or, you can send an ephemeral message to that user by providing a simple string-based `user_auth_message` value or JSON array of blocks using `user_auth_blocks`. Using both properties shows the `user_auth_message` in a notification and the `user_auth_blocks` in the ephemeral message. Specifying `user_auth_url` or `user_auth_message` will automatically imply `user_auth_required` being set to `true`. If both `user_auth_url` and `user_auth_message` are provided, `user_auth_message` takes precedence.",
"required": false
},
"user_auth_required": {
"default": "0",
"desc": "Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain. Specifying `user_auth_url` or `user_auth_message` will automatically imply `user_auth_required` being set to `true`.",
"required": false,
"type": "boolean"
},
"user_auth_url": {
"desc": "Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. Specifying `user_auth_url` or `user_auth_message` will automatically imply `user_auth_required` being set to `true`. If both `user_auth_url` and `user_auth_message` are provided, `user_auth_message` takes precedence.",
"example": "https://example.com/onboarding?user_id=xxx",
"required": false
}
},
"desc": "Provide custom unfurl behavior for user-posted URLs",
"errors": {
"cannot_auth_user": "The current user cannot be authenticated.",
"cannot_find_channel": "The specified channel could not be located for this token.",
"cannot_find_message": "The `ts` value in the request does not match a message.",
"cannot_find_service": "A record of your app being allowed to unfurl for this workspace could not be found.",
"cannot_parse_attachment": "The provided `unfurls` argument could not be parsed or understood.",
"cannot_prompt": "The current user has already interacted with and dismissed a prompt for this application.",
"cannot_unfurl_message": "The URL cannot be unfurled because the URL provided does not appear in the message.",
"cannot_unfurl_url": "The URL cannot be unfurled. This error may be returned if you haven't acknowledged a `link_shared` event tied to the same URL. It is also returned when the domain appears in a workspace's administrative blocklists.",
"invalid_metadata_format": "The `metadata` parameter cannot be JSON-decoded into the expected format.",
"invalid_source": "The unfurl source is invalid.",
"invalid_unfurl_id": "The unfurl ID is invalid.",
"invalid_unfurls_format": "The `unfurls` parameter cannot be JSON-decoded into a map of URLs to attachments.",
"missing_channel": "The request is missing the `channel` parameter",
"missing_source": "The request is missing the `source` parameter.",
"missing_ts": "The request is missing the `ts` parameter",
"missing_unfurl_id": "The request is missing the `unfurl_id` parameter.",
"missing_unfurls": "The request is missing the `unfurls` parameter."
},
"rate_limit": {
"label": "Tier 3: 50+ per minute",
"url": "https://docs.slack.dev/apis/web-api/rate-limits"
},
"scopes": {
"bot": [
{
"name": "links:write",
"url": "https://docs.slack.dev/reference/scopes/links.write"
}
],
"user": [
{
"name": "links:write",
"url": "https://docs.slack.dev/reference/scopes/links.write"
}
]
}
}