The Twin Protocol SDK is a Node.js library that provides seamless integration with the Twin Platform API. This SDK allows developers to easily interact with AI-based twin models and perform other key operations within the Twin Platform Customer Portal.
To use this SDK, you will need Node.js and npm installed in your environment.
-
Just go on the official Node.js website and download the installer. Also, be sure to have
git
available in your PATH, asnpm
might need it (You can find git here). -
You can install Node.js and npm easily with apt install, just run the following commands:
$ sudo apt install nodejs $ sudo apt install npm
-
You can find more information about the installation on the official Node.js website and the official NPM website.
If the installation was successful, you should be able to run the following commands:
$ node --version
v20.13.1
$ npm --version
10.5.2
$ npm install twin-protocol-dev
TP_ACCESS_KEY
TP_SECRET_KEY
TP_CLIENT_ID
TP_BASE_URL
TP_WS_URL
Steps to initialize the SDK:
import TwinProtocol from "twin-protocol-dev";
const _twin = new TwinProtocol({
TP_ACCESS_KEY: "your-access-key",
TP_SECRET_KEY: "your-secret-key",
TP_CLIENT_ID: "your-client-id",
TP_BASE_URL: "your-base-url",
TP_WS_URL: "your-ws-url",
});
For complete usage guides, examples, and API references, please visit the Twin SDK Documentation.
Twin Protocol, Inc 2025