Skip to main content
This documentation is for Stitch.js (v4) SDK, which is now the recommended version for integrating Fasten Connect into your application. If you need access to the previous versions, please see v1 documentation or v3 documentation.This version includes compatibility with additional runtime environments (Web, React Native, React etc), improved performance, and additional features.v4 is backwards compatible with v3 — there are no breaking changes to the public API, but we have made significant improvements to the underlying codebase and architecture. If you are currently using v3, you can upgrade to v4 without making any changes to your code.The v1 Web Component and v3 Web Component are in maintenance mode and will no longer receive updates (outside of security fixes). Please update your code to use the new version.

Installation

stitch.js
<html>
<head>
    <link href="https://cdn.fastenhealth.com/connect/v4/fasten-stitch-element.css" rel="stylesheet">
    <script src="https://cdn.fastenhealth.com/connect/v4/fasten-stitch-element.js" type="module"></script>
</head>
<body>
    <!-- The fasten-stitch element has multiple options,
    see Web Component page for more information -->
    <fasten-stitch-element public-id="pub_live_123456324234234"></fasten-stitch-element>

    <script type="application/javascript">
        const el = document.querySelector('fasten-stitch-element');
        el.addEventListener('eventBus', (event) => console.log(JSON.parse(event.detail.data)));
    </script>
</body>
</html>

Installation (TEFCA Mode)

If you would like to enable TEFCA IAS mode, you can do so by adding the tefca-mode="true" attribute to the <fasten-stitch-element> tag. The remaining installation steps are the same as above, just with the additional attribute. This is intentionally designed to be as simple as possible to get started with TEFCA IAS.
stitch.js
<html>
<head>
    <link href="https://cdn.fastenhealth.com/connect/v4/fasten-stitch-element.css" rel="stylesheet">
    <script src="https://cdn.fastenhealth.com/connect/v4/fasten-stitch-element.js" type="module"></script>
</head>
<body>
    <!-- The fasten-stitch element has multiple options,
    see Web Component page for more information -->
    <fasten-stitch-element public-id="pub_live_123456324234234" tefca-mode="true"></fasten-stitch-element>

    <script type="application/javascript">
        const el = document.querySelector('fasten-stitch-element');
        el.addEventListener('eventBus', (event) => console.log(JSON.parse(event.detail.data)));
    </script>
</body>
</html>