Posting incoming webhook messages from a bot account

I’ve successfully set up an incoming webhook, and it posts from my user with the BOT label as documented. But I’d prefer that the webhook post as a dedicated user. I’ve created a new bot account for this purpose, but I see no way to configure the webhook to post as that bot account instead of from my account. Am I missing something? Thanks.

As far as I’m aware you should be able to do what your asking about. I briefly looked it up on the Mattermost documentation, and saw that the command below is provided to use for verifying a bot account has successfully been created:

curl -i -X POST -H 'Content-Type: application/json' -d '{"channel_id":"<channel-id>", "message":"This is a message from a bot", "props":{"attachments": [{"pretext": "Look some text","text": "This is text"}]}}' -H 'Authorization: Bearer <bot-access-token>' <mattermost-url>/api/v4/posts

Have you read the documentation here?

1 Like

The linked doc says,

Only user accounts can create and configure webhooks and slash commands.

This just looks odd.

At laeast the feature request seems to exist.

Allow bot accounts to create webhooks – Mattermost Feature Proposal Forum (