Slack.Web.Chat.post_ephemeral

You're seeing just the function post_ephemeral, go back to Slack.Web.Chat module for more information.
Link to this function

post_ephemeral(channel, text, user, optional_params \\ %{})

View Source

Sends an ephemeral message to a channel.

Required Params

  • channel - Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.
  • text - Text of the message to send. See below for an explanation of formatting. ex: Hello world
  • user - id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.

Optional Params

  • as_user - Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. ex: true
  • attachments - Structured message attachments. ex: [{"pretext": "pre-hello", "text": "text-world"}]
  • blocks - A JSON-based array of structured blocks, presented as a URL-encoded string ex: [{"type": "section", "text": {"type": "plain_text", "text": "Hello world"}}]
  • link_names - Find and link channel names and usernames. ex: 1
  • parse - Change how messages are treated. Defaults to none. See below. ex: full

Errors the API can return:

  • channel_not_found - Value passed for channel was invalid.
  • is_archived - Channel has been archived.
  • msg_too_long - Message text is too long
  • no_text - No message text provided
  • rate_limited - Application has posted too many messages, read the Rate Limit documentation for more information
  • user_not_in_channel - Cannot post user messages to a channel they are not in.