Mattermost integration within parent application


Good afternoon.

We would integrate Mattermost to our application using an iFrame, I would like to access the “contenWindow” of that iFrame, so I can interact with Mattermost “window” object directly from my application. Is there any JavaScript API which I can interact with or methods that I can run to trigger specific actions?, for instance if I want to open a chat room not mediated by a user action directly in the chat UI, but triggered by one of my Javascript methods, or to automatically sign-out or sign-in, to send a message to a specific chat room, or any other kind of UI interaction.

Does Mattermost has custom events that I can listen from our app JavaScript code?, for instance, I want to listen when a new message was sent to me, so I can run actions in our application UI, like putting some visual notifications inside a custom widget he have for all notifications in our system including messaging.

Thank you.


Hi @maxsdw,

For security, Mattermost currently doesn’t permit itself to be hosted inside an iframe. Feature ideas to change this are welcome.

Javascript and Golang drivers for the API are available. for custom integrations.

There are an array of open source integrations for Mattermost you can reference for your own work.

If you end up building something that could benefit others, would you consider sharing back to the community?


Thanks a lot for your answer. Sure!, I’ll share any feature or adjustment that could benefit others in the future if it is the case.


I’m looking for the exact same feature. Have you come to a good solution?