Rob Campion
Rob Campion

Reputation: 1379

Bot postMessage missing icon and name

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?

Upvotes: 7

Views: 2928

Answers (1)

Rob Campion
Rob Campion

Reputation: 1379

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.

Upvotes: 15

Related Questions