<script src="https://js.streambird.io/sdk/dist/latest/streambird.js"></script>
  var streambird = Streambird('pk_test_KJuRUZmh1XC342h1n39gH84MuSZDyD13NfhtDkaY6IfwpQA0H', {
    headless: false,
    showLoginEmailUI: true,
    showLoginWaitingUI: true,
    networkConfig: {
      rpcUrl: 'https://goerli.infura.io/v3/INFURA_API_KEY'
    },
  });

This reference documents every object and method available in the Streambird browser-side JavaScript library.

You can use Streambird SDK to initiate direct API calls with our SDK public API that accepts a PublicToken. For example, you can initiate email magic link and OAuth all via the SDK using PublicToken. This is also very useful for Web3 focused applications that might not want to implement their own backends to handle user verification using our secret ApiKey.

Setup

To load the Streambird Javascript SDK directly, you can load Streambird.js directly in your document header.

If you prefer to use Streambird.js as a module, we provide an npm package that allows you to load Streambird JS SDK directly into your project’s npm pipeline. Refer to our GitHub repo here.

To Get started with Streambird JS, use Streambird(publicToken, options) to create an instance of the Streambird object. This will be your entrypoint to the rest of the Streambird Javascript SDK. If you use React, refer to the React SDK Reference.

Your publicToken is required when calling this function since it identifies your App to Streambird.

We will be prefilling example with a sample test PublicToken, pk_test_KJuRUZmh1XC342h1n39gH84MuSZDyD13NfhtDkaY6IfwpQA0H.

You should replace it with your own PublicToken under API Keys -> Public.

Methods

publicToken
string
required

Publishable API Key that identifies your App.

options
StreambirdClientOptions Object