Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bot postMessage missing icon and name

Tags:

slack

Using a custom bot, I can postMessages (doc) into a channel (with the bot's auth-token). However, the messages don't show my bot's icon or name, just the default bot's one:

slack-bot

When I change topic, it works fine (i.e. the icon and name of my custom bot appear).

Is there some extra configuration needed?

like image 830
Rob Campion Avatar asked Dec 02 '15 14:12

Rob Campion


1 Answers

Seems the as_user=true param is needed. Doc is somewhat confusing in this regard:

as_user Optional
Pass true to post the message as the authed user, instead of as a bot

The authed user in this case, is the bot whose auth-token you've used.

like image 165
Rob Campion Avatar answered Nov 15 '22 06:11

Rob Campion