December 5, 2024

Amadeo Pellicce (CEO & Founder)

Introducing OpenSDKs:
Typesafe SDKs with Auth Proxy for Any API

Introducing OpenSDKs:
Typesafe SDKs with Auth Proxy for Any API

Introducing OpenSDKs:
Typesafe SDKs with Auth Proxy for Any API

As part of the fourth day of Mega Launch Week, we're excited to announce OpenSDKs—our latest open-source project designed to make API integrations seamless and efficient. 

With OpenSDKs, we're making integrations faster, more secure, and easier to manage. Whether using OpenInt's unified APIs or integrating third-party services, OpenSDKs provides a consistent and type-safe experience with managed end-user authentication via OpenInt proxying under the hood.


The Core of OpenSDKs: OpenInt SDK

At the heart of OpenSDKs is the OpenInt SDK, which allows you to use OpenInt's unified APIs or core APIs. This means you can interact with multiple services through a single, consistent interface, simplifying your integration process. At launch, we’re releasing support for over 40 APIs and our OpenSDK CLI to enable you to generate it for any existing OpenAPI specification.

Example: Use OpenInt’s Core or Unified APIs via OpenSDKs

Here's how to use the OpenInt SDK to embed a file integrations page within your application (as per the OpenInt starter repo!)


import { initOpenIntSDK } from "@opensdks/sdk-openint";
  const endUserId = "user123";
  const openint = initOpenIntSDK({
    apiKey: process.env.OPENINT_API_KEY ?? "",
  });

  const magicLink = await openint.POST("/connect/magic-link", {
    body: { endUserId, validityInSeconds: 2592000 },
  });


Use Any Third-Party OpenSDK with OpenInt

One of the powerful features of OpenSDKs is the ability to use any third-party OpenSDK with OpenInt by passing the OpenInt API key and the resource you need or the end user ID. The requests are proxied with managed authentication to the destination service.

Example: QuickBooks (QBO) Integration

Here's a simple example demonstrating how to interact with QuickBooks Online (QBO) using the OpenInt proxy:


import { initSDK } from "@opensdks/runtime";
import qboSdkDef from "@opensdks/sdk-qbo";
const realmId = process.env.QBO_REALM_ID;
const apiKey = process.env.OPENINT_API_KEY;
const resourceId = process.env.QBO_RESOURCE_ID;
const qbo = initSDK(qboSdkDef, {
  realmId,
  envName: "sandbox",
  auth: { openInt: { apiKey, resourceId } },
});

(async () => {
  const res = await qbo.GET("/companyinfo/{id}", {
    params: { path: { id: realmId } },
  });

  console.log(res.data.CompanyInfo.CompanyName);
})();


In this example, we're initializing the QBO SDK with OpenInt authentication. By passing the apiKey and resourceId, the request to QuickBooks is proxied through OpenInt with managed authentication. This enables you to access your end users resources without having to think about security or scalability. 

Get Started with OpenSDKs Today

Happy integrating!

Back to Launch Week

© 2024 – Map3, Inc.

© 2024 – Map3, Inc.

© 2024 – Map3, Inc.