Mattermost, Inc.

Bot users unable to post any messages

Hello,

I’ve made a few bot accounts on my Mattermost 5.14.0 server, and I’m using the python mattermostdriver package to try to get them to post messages.

To do this, I generate an access token for the bot, and give it to the Driver. It’s able to login fine, but when I try to get the bot to post to a channel, I always get:

2019-09-02T15:27:24.092+1000 error mlog/log.go:173 You do not have the appropriate permissions {"path": "/api/v4/posts", "request_id": "8misgzdihbgzfjedd5oenkhxbc", "ip_addr": "2402:<omitted>", "user_id": "u9uizaytkp8wbmnwxhy5cdbbke", "method": "POST", "err_where": "Permissions", "http_code": 403, "err_details": "userId=u9uizaytkp8wbmnwxhy5cdbbke, permission=create_post"}

The bot has been added to the channel in question. The only slightly weird thing is that I have a restriction on which email address suffixes are allowed to sign up to the server, which I had to remove to add the bots to my team (I then put it back in place afterwards).

I had a quick read of this post:


and in my DB, the result looks like this:

select roles from channelmembers where channelid='uxptfp8rn3g43jw41s4d3pnjre'; 
roles 
-------
 
  
(2 rows)

(The channel only has me and the bot in it)

But that may be because it’s a different issue?

Any help appreciated,

Luke