1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-23 02:06:12 +02:00
OpenIntegrations/docs/en/md/Slack/Message-management/Send-ephemeral-message.md
2024-06-06 15:33:52 +03:00

1.2 KiB

sidebar_position
2

Send ephemeral message

Sends a message that arrives in the channel but is visible only to a specific user

Function SendEphemeralMessage(Val Token, Val Channel, Val Text = "", Val User = "", Val Blocks = "") Export

Parameter CLI option Type Destination
Token --token String Bot token
Channel --channel String Channel ID
Text --text String Message text
User --user String User ID
Blocks --blocks Array of Structure JSON array of block descriptions

Returns: Map Of KeyAndValue - Serialized JSON response from Slack

	
 
 Channel = "C070VPMKN8J";
 Block = OPI_Slack.GenerateImageBlock("https://opi.neocities.org/test_data/picture.jpg", "Image");
 
 Response = OPI_Slack.SendEphemeralMessage(Token, Channel,, User, Block); //Map
 Response = OPI_Tools.JSONString(Response); //JSON string
 
 
	
 
 oint slack SendEphemeralMessage --token %token% --channel "C070VPMKN8J" --text %text% --user %user% --blocks %blocks%



{
 "ok": true,
 "message_ts": "1714146540.000300"
 }