Skip to main content
This documentation is for an old version of Courier’s Web Components.We recommend migrating to Courier Inbox Web Components.
For non-React apps, we have a set of custom elements that you can embed in your web app.

Initialization

If you have all the necessary information to initialize the SDK when the page renders (clientKey, userId, etc) you can initialize the SDK like this:
<body>
  <section>
    <h1>Hello World</h1>
    <courier-toast></courier-toast>
    <courier-inbox></courier-inbox>
  </section>
  <script type="text/javascript">
    window.courierConfig = {
      clientKey: "{{CLIENT_KEY}}",
      userId: "{{USER_ID}}",
    };
  </script>

  <!-- Be sure to use the appropriate version -->
  <script src="https://components.courier.com/v{{CURRENT_VERSION}}.js"></script>
</body>
See additional documentation on GitHub.