Libraries
StreamVi on GitHub provides libraries for API requests, OAuth connections and plugin interfaces. Choose a library for your task:
| Task | Library | Purpose |
|---|---|---|
| API requests in an Axios project | SDK Axios | Typed API methods, parameters and responses |
| API requests through Fetch | SDK Fetch | Typed client using native fetch |
| OAuth in a Passport application | Passport | Node.js strategy with state and PKCE verification |
| React plugin interface | UI Kit | Components with light and dark themes |
The two SDKs solve the same task. Usually you only need one; their transport, error handling and result format differ. Passport handles the connection, after which you can pass the token to your chosen SDK. UI Kit handles appearance and does not obtain API access.
Getting started
First choose a plugin type, create an application and configure permissions for the methods you need. For an external server, obtain a token using the OAuth guide; for a widget, use the launch parameters. Do not send the application secret to the browser.
Having a method in an SDK does not grant permission to call it. An integration token is used for /method/ and belongs to a project. Cabinet methods under /site/, which may also appear in the generated library, require different authentication. Check each method's contract in the API reference.
The SDKs and UI Kit are installed from their main GitHub branch. Keep package-lock.json to pin installed dependencies. Environment requirements and release history are in the library repositories. For a new OAuth connection, start with the server PKCE example; the Passport page explains how to install the fixed strategy.
Example projects
Examples covers an OAuth application and a viewer counter with WebSocket updates. It also links to the server examples included in both SDKs.