{"id":11211,"library":"kinvey-js-sdk","title":"Kinvey JavaScript SDK","description":"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.","status":"abandoned","version":"8.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","Kinvey","JavaScript"],"install":[{"cmd":"npm install kinvey-js-sdk","lang":"bash","label":"npm"},{"cmd":"yarn add kinvey-js-sdk","lang":"bash","label":"yarn"},{"cmd":"pnpm add kinvey-js-sdk","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"While CommonJS `require` might work in some older environments, the SDK ships with TypeScript declarations, implying a modern ESM setup is preferred. `Kinvey` is typically imported as a namespace.","wrong":"const Kinvey = require('kinvey-js-sdk');","symbol":"Kinvey","correct":"import * as Kinvey from 'kinvey-js-sdk';"},{"note":"Named imports are used for accessing core services like `DataStore`. Direct path imports for sub-modules are generally incorrect.","wrong":"import DataStore from 'kinvey-js-sdk/DataStore';","symbol":"DataStore","correct":"import { DataStore } from 'kinvey-js-sdk';"},{"note":"The `User` service for authentication and user management is a commonly imported named export.","symbol":"User","correct":"import { User } from 'kinvey-js-sdk';"}],"quickstart":{"code":"import * as Kinvey from 'kinvey-js-sdk';\n\nconst APP_KEY = process.env.KINVEY_APP_KEY ?? '';\nconst APP_SECRET = process.env.KINVEY_APP_SECRET ?? '';\n\nasync function initializeAndLogin() {\n  try {\n    if (!APP_KEY || !APP_SECRET) {\n      throw new Error('Kinvey App Key and App Secret must be provided via environment variables.');\n    }\n\n    // 1. Initialize Kinvey SDK\n    await Kinvey.init({\n      appKey: APP_KEY,\n      appSecret: APP_SECRET,\n      // Optional: Set masterSecret if using a Node.js environment\n      // masterSecret: process.env.KINVEY_MASTER_SECRET\n    });\n    console.log('Kinvey SDK initialized successfully.');\n\n    // 2. Login a user (or signup)\n    let user;\n    try {\n      user = await Kinvey.User.login('testuser', 'password123');\n      console.log(`User 'testuser' logged in:`, user.data);\n    } catch (error) {\n      if (error.statusCode === 401) { // User not found, attempt signup\n        user = await Kinvey.User.signup('testuser', 'password123');\n        console.log(`User 'testuser' signed up and logged in:`, user.data);\n      } else {\n        throw error;\n      }\n    }\n\n    // 3. Access a data collection\n    const collection = Kinvey.DataStore.collection('myCollection');\n\n    // 4. Create and save a new entity\n    const entity = await collection.save({ message: 'Hello Kinvey!', timestamp: new Date() });\n    console.log('Saved entity:', entity);\n\n    // 5. Fetch entities\n    const query = new Kinvey.Query();\n    query.greaterThan('timestamp', new Date(Date.now() - 24 * 60 * 60 * 1000)); // Last 24 hours\n    const entities = await collection.find(query).toPromise();\n    console.log('Fetched entities:', entities);\n\n  } catch (error) {\n    console.error('Kinvey operation failed:', error.message || error);\n  }\n}\n\ninitializeAndLogin();","lang":"typescript","description":"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."},"warnings":[{"fix":"Migrate your application's backend services to an alternative platform (e.g., AWS Amplify, Firebase, Back4App).","message":"The Kinvey platform has been officially sunsetted and is no longer actively supported or maintained by Progress Software. All users are advised to migrate to an alternative backend solution. This SDK will not receive further updates or security patches.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Avoid starting new projects with Kinvey SDKs. For existing projects, plan for migration away from the Kinvey ecosystem.","message":"Many Kinvey-related GitHub repositories, including those for specific SDK shims (e.g., HTML5, NativeScript, Node.js), have been archived and are now read-only, indicating that these components are no longer in active development.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"For new development or migration, always use ESM `import` syntax. If targeting older Node.js or non-transpiled environments, ensure your build process correctly handles CommonJS or dual packages.","message":"Older versions of various Kinvey SDKs frequently used CommonJS `require()` syntax. While `kinvey-js-sdk` v8.0.0 provides TypeScript declarations, modern bundlers and Node.js environments may prefer or enforce ESM `import` statements.","severity":"gotcha","affected_versions":"<8.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure the Authorization header string adheres strictly to the `Type Base64String` format, including the space, for example, `Authorization: Basic <base64-encoded-credentials>`.","cause":"Incorrectly formatted Authorization header in HTTP requests, often due to a missing space after 'Basic' or 'Kinvey' in the header string.","error":"error: \"The Authorization header in your request is malformed. An Authorization header should contain two parts separated by a space: a type (Basic or Kinvey) and a base64-encoded auth string."},{"fix":"Ensure `import * as Kinvey from 'kinvey-js-sdk';` is used for the main entry point and that `Kinvey.init()` is called only after the SDK module has been fully evaluated. Check for typos in method names.","cause":"The Kinvey SDK was not properly initialized or imported. This often happens if `Kinvey` is imported incorrectly (e.g., default import instead of namespace import) or if `Kinvey.init()` is called before the SDK is fully loaded.","error":"Kinvey.init is not a function or is undefined"}],"ecosystem":"npm"}