provider chat POST /chat.postEphemeral
@utdk/slack /chat.postEphemeral
chat_postEphemeral
Sends an ephemeral message to a user in a channel.
token header required
Authentication token. Requires scope: `chat:write`
string

Try it

Authentication
Configure credentials for Slack Web API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

chatPostephemeral
POST/chat.postEphemeral
Sends an ephemeral message to a user in a channel.

Input

Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.

A JSON-based array of structured attachments, presented as a URL-encoded string.

A JSON-based array of structured blocks, presented as a URL-encoded string.

required

Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.

Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below.

URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.

Find and link channel names and usernames.

Change how messages are treated. Defaults to `none`. See [below](#formatting).

How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail.

Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread.

required

`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.

Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import slack from '@utdk/slack';

await slack.chatPostephemeral()