Web - TypeScript/React

Follow this step-by-step tutorial on how to use CelebritySDK.

API Documentation

Requirements

Create a project

To create a project we recommended using the following stack: React + TypeScript.

  • Create an empty React + Typescript project

npx create-react-app my-app --template typescript  

Add Celebrity SDK library to your project

  • Create .npmrc file. In the project’s root folder

  • Put your Access Token inside //registry.npmjs.org/:_authToken=YOUR_ACCESS_TOKEN.

  • Install Celebrity SDK via npm i @sscale/celebritysdk.

For more information on NPM installation look here.

Basic usage

Participant

  • Add the following import:

  • Create participant API instance:

  • Pass Watch Together access token (reference) to participant API instance:

  • Invite/check/uninvite celebrity to/from your live Watch Together session created using WT_TOKEN:

Celebrity

  • Add the following import:

  • Create celebrity API instance:

  • Login with username/password provided by Sceenic:

  • Subscribe to the list of available video/audio chat sessions:

  • Unsubscribe/logout:

Have a look at the API Documentation here.

Support

Need technical support? Contact us at [email protected].

Last updated

Was this helpful?