Skip to content

Technology / Development

What is an SDK?

SDK means software development kit. It bundles reusable code, tools, and guidance for building with a particular platform or service.

01 / Understand it · 1 minute

Basic

Think of an SDK as a toolbox: you start with useful parts and instructions instead of making every tool yourself.

SDK vs. API vs. library

API
An interface: the operations software exposes and the rules for using them.
Library
Reusable code your program calls to do a job.
SDK
A kit for a platform or service. It may include libraries, documentation, examples, and build or debugging tools.

An SDK often helps you use an API. The API can still exist without the SDK. AWS explains the distinction ↗

Two common shapes

Remember: an SDK saves setup work; you still write the logic that makes your app useful.

02 / Use it · 2 minutes

Intermediate

The usual flow: install the package, create a client, call a method, then handle the result or error.

A real SDK call

This server-side Node.js example reads up to three customers from a Stripe sandbox. Install stripe with npm install stripe, set STRIPE_SECRET_KEY to your sandbox secret key in your environment, save as example.mjs, and run node example.mjs.

import Stripe from 'stripe';

const client = new Stripe(process.env.STRIPE_SECRET_KEY);

try {
  const page = await client.customers.list({ limit: 3 });
  console.log(page.data.map(customer => customer.id));
} catch (error) {
  console.error('Request failed:', error.type);
  process.exitCode = 1;
}

An empty array is normal if your sandbox has no customers. Keep secret keys on the server, outside browser code and Git. Key setup ↗ · Method reference ↗

What the SDK does for you

Your method call becomes an authenticated HTTP request. The SDK formats it and turns the response into objects you can use. You still handle permissions, errors, and pagination (fetching more than one page of results).

Try it: change the limit to 1. Find data and has_more in the response docs and explain what each means.

03 / Ship it reliably · 2 minutes

Pro

An SDK makes requests convenient. Your application still owns what happens when a request fails, repeats, or changes.

Five things to understand

SDK or direct HTTP? Use the SDK when its helpers and maintenance save work. Direct HTTP can make sense for a small integration or an unsupported runtime, but you own request formatting, authentication, and error handling.

Think it through: the service completes a write, but the response is lost. How will your app retry without doing the work twice?

Find something.

Search the wiki, writing, apps, and more.

Esc to close · ⌘K / Ctrl K to search

Say hello.

Have a question, an idea, or just want to connect?

hi@masonearl.com
Gmail ↗Outlook ↗

Choose your email service, or try your default email app ↗.

X / @masonearl ↗LinkedIn ↗