Skip to main content

Configuration

The SDK libraries are distributed from the NPM registry located at https://repo.sonicmedia.io/repository/npm/

Set the NPM registry in your project

Create a .npmrc file if it doesn't exist and add the following line:

.npmrc
@sonicmedia:registry=https://repo.sonicmedia.io/repository/npm

Add the SonicMedia SDK dependency

npm install @sonicmedia/sdk

SDK Initialization

The SDK needs to be initialized using the API Key and Server URL provided by SonicMedia.

import SonicMedia from "@sonicmedia/sdk";

SonicMedia.configure("<apikey>", "<serverurl>");