# Mattermost integration within parent application

**URL:** https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678
**Category:** Troubleshooting
**Created:** [December 22, 2015, 6:34pm UTC](https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678 "2015-12-22T18:34:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maxsdw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/maxsdw/32/343_2.png) [@maxsdw](https://forum.mattermost.com/u/maxsdw)
#### Post date: [December 22, 2015, 6:34pm UTC](https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678/1 "2015-12-22T18:34:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![it33](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/it33/32/3_2.png) [@it33](https://forum.mattermost.com/u/it33)
#### Post date: [December 29, 2015, 3:01pm UTC](https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678/2 "2015-12-29T15:01:15Z")

</div>

Hi @maxsdw,

For security, Mattermost currently doesn’t permit itself to be hosted inside an iframe. [Feature ideas to change this are welcome](http://www.mattermost.org/feature-requests/).

[Javascript and Golang drivers for the API are available.](https://github.com/mattermost/platform/blob/master/doc/developer/API.md) for custom integrations.

There are an array of [open source integrations](http://www.mattermost.org/community-applications/) 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?

---

<div class="post-metadata">

### Author: ![maxsdw](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/maxsdw/32/343_2.png) [@maxsdw](https://forum.mattermost.com/u/maxsdw)
#### Post date: [January 6, 2016, 3:40pm UTC](https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678/3 "2016-01-06T15:40:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![hubert](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@hubert](https://forum.mattermost.com/u/hubert)
#### Post date: [January 11, 2017, 4:55pm UTC](https://forum.mattermost.com/t/mattermost-integration-within-parent-application/678/4 "2017-01-11T16:55:38Z")

</div>

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