Embedding ClientV2 as a chat window in your page

You can embed the ClientV2 to your page in a very straightforward way by an iframe:

<iframe src="https://clientv2.mybluemix.net/#view=chat&view_switch_enabled=false"/>

You can state the configuration of the client by hash parameters in the iframe URL. Beside the cofiguration included int the example above, you'll always want to configure at least your conversations service credentials (username and password) and the workspace id or name (prefered_workspace_id, prefered_workspace_name). See the configuration page for complete list of customizations.

Exmaple page

The example page with an embedded chat client is here. The demo page also includes example of communication between the parent page and the embedded client. It is possible to both:

The demo page includes exmaple of both in the simplest form possible. Feel free to explore the source code.

Embedding a page into the ClientV2

This exmaple conversation shows an embedded page by responding with:

	"output": {
		"url": "/examples/embedded_page.html"

The interaction between the client and the page works exactly the same way as in the case above.