Class Payload
Implementation of Incoming Webhook Payloads
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Payload.PayloadBuilderbuilder()protected booleanbooleanAn array of legacy secondary attachments.An array oflayout blocksin the same format as described in the layout block guide.Deprecated.Deprecated.Deprecated.https://api.slack.com/metadatagetText()The first step is to prepare this message as a key/value pair in JSON.You can add the thread_ts parameter to your POST request in order to make your message appear as a reply in a thread.Pass true to enable unfurling of primarily text-based content.Pass false to disable unfurling of media content.Deprecated.inthashCode()voidsetAttachments(List<Attachment> attachments) An array of legacy secondary attachments.voidsetBlocks(List<LayoutBlock> blocks) An array oflayout blocksin the same format as described in the layout block guide.voidsetChannel(String channel) Deprecated.voidsetIconEmoji(String iconEmoji) Deprecated.voidsetIconUrl(String iconUrl) Deprecated.voidsetMetadata(Message.Metadata metadata) https://api.slack.com/metadatavoidThe first step is to prepare this message as a key/value pair in JSON.voidsetThreadTs(String threadTs) You can add the thread_ts parameter to your POST request in order to make your message appear as a reply in a thread.voidsetUnfurlLinks(Boolean unfurlLinks) Pass true to enable unfurling of primarily text-based content.voidsetUnfurlMedia(Boolean unfurlMedia) Pass false to disable unfurling of media content.voidsetUsername(String username) Deprecated.toString()
-
Method Details
-
builder
-
getThreadTs
You can add the thread_ts parameter to your POST request in order to make your message appear as a reply in a thread. -
getText
The first step is to prepare this message as a key/value pair in JSON. For a simple message, your JSON payload only needs to define a text property, containing the text that will be posted to the channel. -
getChannel
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.Incoming webhooks output to a default channel and can only send messages to a single channel at a time. You can override a custom integration's configured channel by specifying the channel field in your JSON payload.
Specify a Slack channel by name with "channel": "#other-channel", or send a Slackbot message to a specific user with "channel": "@username".
-
getUsername
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.Incoming webhooks originate from a default identity you configured when originally creating your webhook. You can override a custom integration's configured name with the username field in your JSON payload.
-
getIconUrl
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.You can also override the bot icon either with icon_url or icon_emoji.
-
getIconEmoji
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.You can also override the bot icon either with icon_url or icon_emoji.
-
getBlocks
An array oflayout blocksin the same format as described in the layout block guide. -
getAttachments
An array of legacy secondary attachments. We recommend you useblocksinstead. -
getUnfurlLinks
Pass true to enable unfurling of primarily text-based content. -
getUnfurlMedia
Pass false to disable unfurling of media content. -
getMetadata
https://api.slack.com/metadata -
setThreadTs
You can add the thread_ts parameter to your POST request in order to make your message appear as a reply in a thread. -
setText
The first step is to prepare this message as a key/value pair in JSON. For a simple message, your JSON payload only needs to define a text property, containing the text that will be posted to the channel. -
setChannel
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.Incoming webhooks output to a default channel and can only send messages to a single channel at a time. You can override a custom integration's configured channel by specifying the channel field in your JSON payload.
Specify a Slack channel by name with "channel": "#other-channel", or send a Slackbot message to a specific user with "channel": "@username".
-
setUsername
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.Incoming webhooks originate from a default identity you configured when originally creating your webhook. You can override a custom integration's configured name with the username field in your JSON payload.
-
setIconUrl
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.You can also override the bot icon either with icon_url or icon_emoji.
-
setIconEmoji
Deprecated.NOTE: No longer works if your webhook is managed in a Slack app while it's still available for the custom integration (https://slack.com/apps/A0F7XDUAZ) in App Directory.You can also override the bot icon either with icon_url or icon_emoji.
-
setBlocks
An array oflayout blocksin the same format as described in the layout block guide. -
setAttachments
An array of legacy secondary attachments. We recommend you useblocksinstead. -
setUnfurlLinks
Pass true to enable unfurling of primarily text-based content. -
setUnfurlMedia
Pass false to disable unfurling of media content. -
setMetadata
https://api.slack.com/metadata -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-