Skip to main content

Delete message

Deletes a channel message by timestamp

Function DeleteMessage(Val Token, Val Channel, Val Timestamp, Val IsDelayed = False) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringBot token
Channel--channelStringChannel ID
Timestamp--stampStringTimestamp or message ID
IsDelayed--issheduledBooleanIndicator of deleting a delayed message

Returns: Map Of KeyAndValue - serialized JSON response from Slack


1C:Enterprise/OneScript code example
    Token     = "xoxb-6965308400114-696804637...";
Channel = "C06UFNUTKUL";
Timestamp = "1729541148.797409";

Result = OPI_Slack.DeleteMessage(Token, Channel, Timestamp);
    oint slack DeleteMessage \
--token "***" \
--channel "C06UFNUTKUL" \
--stamp "1730381068.292829"
Result
{
"ok": true,
"channel": "C06UFNUTKUL",
"ts": "1728454508.757479"
}