Integrating into Website


Hi All,

I am trying to integrate Rocket into my website, I have been looking at the documentation but do not understand exactly how to do that as an iframe. I pretty much want the iframe to autologin as a defined a user that I define into a channel. Im just unsure how to layout the iframe and rest api. Any help would be awesome


Having the same issue. SSO is showing a bar on the login screen which is not useful. There should be documentation for implementing auto login using different ways.


This is doable but it takes quite a lot of digging since the documentation is uhmm bad and poorly written. Here’s what I did (Note that it’s close but It doesn’t work for me completely at this point)

First you setup an account in your rocketchat server that has admin privileges. You will use this account using REST calls to automatically create user accounts.

I would advise that this is done in a server you write, something in PHP, Pythin or JEE, because you don’t want to have these credentials floating around in your webpage.

Use the same code to log the user into your rocketchat instance with the newly created account:

You will get a JSON object back that has a token. You can then use that token to call postMessage on the iframe where you have rocketchat embedded, as per:

I’m stuck on this one myself. This should all work according the documentation but I’m seeing an error in the iframe running rocketchat.