Establishing your first connection

To connect to Elarian, you'll need to install one of our official SDKs:

$ npm install --save elarian

Next, you'll need an orgId, appId, and apiKey, which you can get from your dashboard. If you haven't signed up yet, you can do so here, and these values will be available by default.

Get your orgId

get org id image

Get your appId

get app id image

Get your apiKey

get api key image


Once you have your connection variables, import the Elarian SDK and establish a connection like this:

const client = new Elarian({
    orgId: 'your-org-id',
    appId: 'your-app-id',
    apiKey: 'your-api-key'
    .on('error', (err) => console.error(`Connnection error: ${err}`))
    .on('connected', () => console.log('App is running!'))

With the code above, you'll establish a persistent bi-directional connection to Elarian that you can use to send and receive data. The SDK automatically handles reconnection in the scenario that the connection is lost.