Node SDK
Zesty.io Software developer kit (SDK) with Node SDK
This is a basic example of how to setup an authenticated SDK instance and request data.
*Requires Nodejs installed on your system.
1) Use a package manager to install the SDK. e.g. npm install @zesty-io/sdk
2) Create an example file
// example/basic/index.jsconst SDK = require("@zesty-io/sdk");// !!! Do not commit your password to a repository. This needs to stay secret.// We only have you enter it here for simplicity of the example.// Add your user email, password and instance ZUIDconst ZESTY_USER_EMAIL = "";const ZESTY_USER_PASSWORD = "";const ZESTY_INSTANCE_ZUID = "";async function main() { // Get authenticated session const auth = new SDK.Auth(); const session = await auth.login(ZESTY_USER_EMAIL, ZESTY_USER_PASSWORD); // Instantiate sdk instance with instance ZUID and authenticated session token const sdk = new SDK(ZESTY_INSTANCE_ZUID, session.token); // Request instance data const res = await sdk.instance.getModels(); // View our response data in the console console.log(res.data);}// Run the functionmain();
3) Run the example with node index.js
See Instantiation
Further explanations of the example code
Connect with Content Experts
Book a free 15-minute consultation with a content expert. Discuss your application, pain points and requirements. Understand how Zesty's lower total cost of ownership, features, functionality can elevate your business by creating extraordinary digital experiences.
Trusted By
G2 MOMENTUM LEADER

