Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set icon_emoji with the new incoming webhooks?

I've been going around in circles and I think icon_emoji is now part of legacy code, but I keep seeing examples of people using icon_emoji floating around.

I have a custom slack app set up, which uses the new blocks etc. I would love to use the icon_emoji but haven't had any luck figuring it out. I've tried using curl as well, and was also unsuccessful there too. The slack docs mention it doesn't work with bot users, but I haven't set one up?

I'm just an emoji girl living in an emoji world, would love to figure this out if possible!

Thanks :)

like image 967
watermelon_party Avatar asked Nov 08 '25 16:11

watermelon_party


1 Answers

It's working for me using curl to send to https://hooks.slack.com/services/.... more information at https://api.slack.com/messaging/webhooks

example:

curl -X POST --data-urlencode "payload={\"channel\": \"#test\", \"username\": \"myBot\", \"text\": \"hello\", \"icon_emoji\": \":ghost:\"}" https://hooks.slack.com/services/...

Also the icon may only show up once due to message consolidation. See https://stackoverflow.com/a/42109435/2045153

like image 126
AlphaCactus Avatar answered Nov 12 '25 16:11

AlphaCactus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!