Iframe embedding and embedding using the viewer API are only available for ShapeDiver users with a paid subscription.

In the “Embedding” section of the model edit page, you have the ability to enable embedding for the ShapeDiver model from web browsers. It is necessary to enable embedding in the following cases:

Simply check the “Allow embedding” box to enable embedding.

The domain name of the web application from which the model will be accessed must be whitelisted. Make sure you have set up domains for embedding in your account settings.

Iframe embedding

In order to use the iframe feature, simply save the settings and go back to the model view page, where you will have access to the iframe options and the ability to copy the full iframe code for your website.

Direct embedding using the Viewer API

Once the box is checked, three elements are displayed in the section:

  • An embedding ticket

  • The model view URL, which indicates which backend system is hosting the model. ShapeDiver uses several geometry backend systems and it is important to specify which one hosts your model when using the viewer API.

  • As a read-only information, the domains you have whitelisted for embedding are displayed on the right.

You can copy the ticket and the model view URL and use them with the viewer API to build a custom web application. The simple example on this page clearly shows where to use both elements in order to start a session to your model.

Once you have allowed embedding for your model, make sure you have set up domains for embedding in your account settings.

The embedding ticket can only be used to open a session with the model from a web browser. In order to communicate with the model in a headless context (applications that do not run in a web browser), you will need to enable backend access and use a ticket for backend access.

Access the Geometry Backend API from a browser

In case your application is directly accessing the model using the Geometry Backend API from a browser, without using the viewer we provide, use the embedding ticket and model view URL as described above. As an example this case applies if you are using a different viewer, or if you are triggering exports directly using the Geometry Backend API or SDK from a browser.