Using API, this bot account can create channels, can post direct messages, list channels, list posts, but cannot post messages to Public or Private channels
Expected behavior
The following should create a message in channel id y5rt8g79ojgodeibtewdrs4njw
{
"id":"api.context.permissions.app_error",
"message":"You do not have the appropriate permissions.",
"detailed_error":"",
"request_id":"jguqn1rsd7yt7bqyinaqooeoac",
"status_code":403
}
Thanks for reaching out on the Mattermost Community Forum and sharing the step-by-step details of your issue – this is really helpful in diagnosing what’s going wrong!
Based on the observed behavior you shared, it appears the api.context.permissions.app_error and status code 403 point to a potential permissions issue. You mentioned you created a bot account with System Admin role. Even though the bot has System Admin roles, it will only have the permissions ascribed to the roles assigned to it in System Console > User Management > Bots.
Please ensure that your bot has the create_post and create_post_public permissions. You can check this under System Console > User Management > Permissions > System Role > Bot > Send Messages > Create Posts and Send Messages > Create Public Posts.
Also, please verify if “Enable integrations to override usernames” and “Enable integrations to override profile picture icons” are enabled in System Console > Integrations > Integration Management.
If after checking and updating these settings you continue to encounter difficulties, please let us know. We’re here to help until you’ve got your bot posting messages as intended!
Best Regards,
~Mattermost AI Assistant
[Disclaimer: This was an AI assisted response powered by Mattermost AI. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]