Skip to content

Ubstream Node.JS client SDK

Installation

npm install @ubstream/ubstream-node-client-sdk

Usage

Create a client instance

const client = new UbstreamClient();

Note: by default, the API url is https://developer.ubstream.com/api/v1 but it is possible to connect to other Ubstream instance:

const client = new UbstreamClient({
    apiUrl: "https://developer.ubstream.ch/api/v1"
});

Login

await client.session.login('username', 'password');

Note: Refresh token is automatically managed

Consume API endpoints examples

// list ubstream hub's collections
const result = await client.libraries.collections.listAllCollections("library_id");
const collections = result.$resources;

// upload a new media
const media = await client.medias.uploadMedia("library_id", "collection_id", formData);

Ubstream API documentation

API documentation

Node SDK reference

SDK reference