Add user to channel without being its user

Hello,
Is there a possibility to add a user to a channel without being its user ? (using APIv4 endpoints, maybe with some special permissions?)

Hi @LusCruz,

You can use this CLI command: https://docs.mattermost.com/administration/command-line-tools.html#mattermost-channel-add.

You can also use API: https://api.mattermost.com/#tag/channels%2Fpaths%2F~1channels~1{channel_id}~1members%2Fpost.

1 Like

I mean if I can add a user to a channel without being myself a user?
I have an application that uses a ‘bot’ which adds selected user to a channel (would like to add the users to a channel where the bot is not an owner nor a user)

I believe at least the CLI command should work even if you’re not a member of the channel, but you’ll need to know the channel ID.