Step 1 — Import the SDK
This guide will use a simple html document with the configuration of the StreamConnect SDK set in an html head script. The html surrounding the SDK will not change throughout the guide. Here is what the test htmlscript looks like.<script src="https://app.tpastream.com/static/js/sdk.js"></script> in the head will bring down the latest version of the StreamConnect SDK. If for any reason you require a previous version or wish to set the SDK to a specific version change the src to something like
<script src="https://app.tpastream.com/static/js/sdk-v-0.5.4.js"></script>. The SDK CDN provides up to 10 minor version prior.
Step 2 — Add element for SDK to hook to and init SDK
el element. It is suggested
that an implementor starts the SDK init with isDemo set to true as shown above so that an implmenetor can see the initial SDK page.
*Demo mode is incapable of saving credentials or validating credentials.
If you then open up the above html in a browser you should see something close to the following.
Step 3 — Add sdk Token
sdkToken you will see the following page on your html.
That is ok! In order to initialize the SDK you will need to have quite a few more values. So for now it won’t properly init.
If you go into the developer tools for your site, you can get several helpful errors from the various requests which the SDK
is generating. In this case the following init errors will likely provide 422 responses.
Example Error:
404 error at this step it is possible that your sdkToken is not configured properly. Stick with the guide to see
if the error naturally resolves as you add the rest of the configuration.
Step 4 — Add user configuration
youremail+testingsdk@gmail.com.
This will allow you to set-up a new account in TPAStream which is separate from your current one, but also have the emails go to
your current email.
Step 5 — Employer configuration
You will see Internal Key as a section. Grab the key directly across from that and put it into the systemKey config option in the employer object. In this case it is highleted and called testing-sdk.

