Skip to content

SDK

The Bizzkit CMS SDK can be used to handle authentication when creating your own plugins for the Bizzkit CMS. This guide will help you get started with the SDK for Bizzkit CMS.

Installation

Add a .npmrc file to your project in the same directory as your package.json:

1
2
3
registry=https://pkgs.dev.azure.com/bizzkit-platform/7dad82b4-f2ae-4a3a-ab87-3fc791e4ea62/_packaging/bizzkit-partner-feed/npm/registry/

always-auth=true

Then, run vsts-npm-auth to retrieve an Azure Artifacts token, which will be added to your user-level .npmrc file:

vsts-npm-auth -config .npmrc

Note: You don't need to run this every time. If you encounter an npm 401 Unauthorized error, it indicates you need to run it again.

Finally, install the package:

npm i @bizzkit/cms-sdk

Usage

Signing in with Bizzkit products from within a Builder.io plugin

1
2
3
4
5
import { signIn } from '@bizzkit/cms-sdk';

const { token } = await signIn({
    contentUrl: '<customer>-content.bizzkit.cloud'
});

This will provide you with a bearer token that can be used to call other Bizzkit product APIs, such as DAM, ECS, and PIM. The function also handles caching the bearer token, so the user is not required to sign in each time.