SDKs
Official client libraries for the USBC API. Use these to integrate without writing HTTP plumbing or token management yourself.
Placeholder links — the GitHub repositories below don't exist yet. They'll be populated as SDKs ship.
Available SDKs
| Language | Status | Package | Source |
|---|---|---|---|
| JavaScript / TypeScript | Planned | npm install @usbc/sdk | github.com/usbc/sdk-js |
| Swift | Planned | Swift Package Manager | github.com/usbc/sdk-swift |
| Kotlin (Android & JVM) | Planned | com.usbc:sdk (Maven Central) | github.com/usbc/sdk-kotlin |
| Python | Planned | pip install usbc | github.com/usbc/sdk-python |
| Go | Planned | go get github.com/usbc/sdk-go | github.com/usbc/sdk-go |
Each SDK is versioned independently and follows semver. Release notes live in each repo's CHANGELOG.md.
Quick install — JavaScript
npm install @usbc/sdk
# or
pnpm add @usbc/sdk
import { UsbcClient } from "@usbc/sdk";
const client = new UsbcClient({
baseUrl: "https://api.kong.globalid.dev",
clientId: process.env.USBC_CLIENT_ID!,
clientSecret: process.env.USBC_CLIENT_SECRET!,
});
const me = await client.users.me();
console.log(me);
The SDK handles:
- Token issuance and caching (no manual
/oauth/tokencalls). - Automatic retries with backoff on
429and5xx. - Typed request/response models generated from the OpenAPI spec.
- Idempotency-key injection on mutating requests.
Quick install — Python
pip install usbc
from usbc import UsbcClient
client = UsbcClient(
base_url="https://api.kong.globalid.dev",
client_id=os.environ["USBC_CLIENT_ID"],
client_secret=os.environ["USBC_CLIENT_SECRET"],
)
me = client.users.me()
print(me)
Don't see your language?
Generate a client from any of the OpenAPI specs using a code generator:
| Tool | Languages | Example |
|---|---|---|
openapi-generator | 50+ languages | openapi-generator generate -i spec.yaml -g rust -o ./rust-client |
oapi-codegen | Go | oapi-codegen -package usbc spec.yaml > client.go |
swift-openapi-generator | Swift | Bundled with Swift Package Manager |
Generated clients work fine — you just have to handle token issuance and retries yourself (the official SDKs above do that automatically).
Versioning & support policy
- Latest minor — fully supported, all bug fixes and security patches.
- Previous minor — security fixes only, for 6 months after a new minor ships.
- Major bumps — announced 90 days in advance via portal release notes.
Pin to a minor version in production and upgrade on your own cadence. The OpenAPI surface is backwards-compatible within a major version, so dropping in a new minor should be safe.
Reporting issues
File issues against the relevant SDK repo on GitHub. For API-side issues (server returning the wrong shape, etc.), open them on the main API repo instead. Include the error_id from any error responses you saw — it makes triage 10× faster.