Search code examples
botsslack-apislack

Slack: Bot name in sent messages


I created a bot named "esmeralda". When I send a message to Slack with the token generated for this esmeralda, the message just appears to be from "bot", not "esmeralda".

Can I do something so that the message will be shown to be sent by "esmeralda" instead the "bot"?


Solution

  • I'm guessing you're using the Web API and therefore the chat.postMessage method?

    I'm further guessing that you're not passing as_user=true as one of your parameters. Try doing that.

    (If my guesses are wrong, please include the actual details of what you're doing: at least tell us what API you're using, what method you're calling, and what parameters you're passing. Ideally share code.)