zesty.io

Product

Use Cases

Integrations

Learn

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

  1. Instantiation of an authenticated instance
  2. Requesting instance data

Start Here

We will listen to your needs and walk you through how Zesty can help your team.

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

zesty customer logo Sonyzesty customer logo Rocket Leaguezesty customer logo Singlifezesty customer logo Acornszesty customer logo Phoenix Sunszesty customer logo Wattpadzesty customer logo Corner Shopzesty customer logo Bjs

G2 MOMENTUM LEADER

zesty customer logo zesty customer logo zesty customer logo zesty customer logo

Enter your details to connect with a Content Expert

First Name

Last Name

Email

Phone (optional)

Company

Please tell us about your project (optional)