Skip to main content

Getting started

How to prepare for embedding an interview on your website.
1

Grab the ID of the interview you want to embed

This can be found in the URL of the interview when you are on the interview page.
2

Request a Publishable key

A publishable key is similar to an API key, only it is safe to be used on public websites.
3

Allow access from your domain

Together with the publishable key, an allow list of domains acts as security measures to prevent the interview from being embedded on unwanted domains.

How?

At the moment, a publishable key can be obtained by contacting us. You can do this by reaching out directly in a connected Slack channel, or by sending an email to [email protected]

Code snippets

Use any of the following code snippets to embed an interview.

Auto start

Using this code snippet the interview will immediately load and render in the given container.In addition an interview session will be created with the provided participant information.
<script type="text/javascript" src="https://cdn.usepropane.ai/[email protected]"></script>

<script type="text/javascript">
  const client = PROPANE_SDK.init({
    publishableKey: "<your_publishable_key>",
  });

  client.embedInterview({
    container: "#interview-container",
    interview: {
      id: "[interview_id]",
      participant: {
        first_name: "Jane",
        last_name: "Doe",
        email: "[email protected]",
        //...interview_specific_fields
      }
    }
  });
</script>
Note that the fields in the participant object depends on the type of interview.For a full list of fields please visit our OpenAPI documentation

Troubleshooting

Important security requirements and considerations when embedding interviews on your website.
If your website uses a Content Security Policy, you’ll need to allow the following sources:
  • script-src: Add https://cdn.usepropane.ai to allow loading the Propane SDK script
  • frame-src: Add https://interview.usepropane.ai to allow the interview iframe
Example CSP header:
Content-Security-Policy: script-src 'self' https://cdn.usepropane.ai; frame-src 'self' https://interview.usepropane.ai;
Your website’s domain must be explicitly allowed. The interview will not load if your domain is not on the allowlist, even with a valid publishable key.This security measure prevents unauthorized use of your interview on other websites. Make sure to provide all domains (including subdomains) where you plan to embed the interview.
When embedding third-party scripts, consider the following best practices:
  • The Propane SDK loads from a trusted CDN with HTTPS encryption
  • The script creates an isolated iframe for the interview content
  • No sensitive data from your website is accessible to the interview iframe
If the interview fails to load, check for these common issues:
  • CSP blocking: Check browser console for CSP violation errors
  • Domain not allowlisted: Verify your with us that the domain is configured correctly
  • HTTPS requirement: The interview must be embedded on HTTPS websites
  • Container element: Ensure the target container element exists when the script runs