Kinvey JavaScript SDK

8.0.0 · abandoned · verified Sun Apr 19

The Kinvey JavaScript SDK (kinvey-js-sdk) provided a client-side interface for interacting with the Kinvey Mobile Backend as a Service (MBaaS) platform. Designed to simplify backend development, it offered functionalities like data storage, user management, authentication, and file storage, allowing developers to focus on front-end logic for web and mobile applications. The SDK aimed to provide a low-code approach, integrating with various JavaScript frameworks such as Angular, React, NativeScript, Vue, and HTML5. The current stable version, 8.0.0, was last published in mid-2020. However, the Kinvey platform, and by extension its SDKs, has been explicitly sunsetted and is no longer actively maintained or supported by Progress Software, with many related GitHub repositories archived since 2019 or early 2025. There is no ongoing release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize the Kinvey SDK, log in (or sign up) a user, save data to a collection, and retrieve data using a query. It highlights core functionalities of the backend-as-a-service platform.

import * as Kinvey from 'kinvey-js-sdk';

const APP_KEY = process.env.KINVEY_APP_KEY ?? '';
const APP_SECRET = process.env.KINVEY_APP_SECRET ?? '';

async function initializeAndLogin() {
  try {
    if (!APP_KEY || !APP_SECRET) {
      throw new Error('Kinvey App Key and App Secret must be provided via environment variables.');
    }

    // 1. Initialize Kinvey SDK
    await Kinvey.init({
      appKey: APP_KEY,
      appSecret: APP_SECRET,
      // Optional: Set masterSecret if using a Node.js environment
      // masterSecret: process.env.KINVEY_MASTER_SECRET
    });
    console.log('Kinvey SDK initialized successfully.');

    // 2. Login a user (or signup)
    let user;
    try {
      user = await Kinvey.User.login('testuser', 'password123');
      console.log(`User 'testuser' logged in:`, user.data);
    } catch (error) {
      if (error.statusCode === 401) { // User not found, attempt signup
        user = await Kinvey.User.signup('testuser', 'password123');
        console.log(`User 'testuser' signed up and logged in:`, user.data);
      } else {
        throw error;
      }
    }

    // 3. Access a data collection
    const collection = Kinvey.DataStore.collection('myCollection');

    // 4. Create and save a new entity
    const entity = await collection.save({ message: 'Hello Kinvey!', timestamp: new Date() });
    console.log('Saved entity:', entity);

    // 5. Fetch entities
    const query = new Kinvey.Query();
    query.greaterThan('timestamp', new Date(Date.now() - 24 * 60 * 60 * 1000)); // Last 24 hours
    const entities = await collection.find(query).toPromise();
    console.log('Fetched entities:', entities);

  } catch (error) {
    console.error('Kinvey operation failed:', error.message || error);
  }
}

initializeAndLogin();

view raw JSON →