SDK Overview
ButtrBase publishes official SDKs for Rust*, **Node.js**, **Python**, and *Go. All four SDKs wrap the same REST API and share a common auth model — install whichever fits your runtime.
Auth model
ButtrBase issues RS256 JWTs signed with a rotating RSA key pair. The public keys are available at:
~~~ https://api.buttrbase.com/.well-known/jwks.json ~~~
Your service can verify tokens locally — no round-trip to ButtrBase on every request — by fetching and caching the JWKS, then validating the signature, expiry, and issuer.
Audience claim: ButtrBase access tokens do not pin a stable per-application aud value. Skip audience validation in your verifier; identity comes from iss, the RSA signature, and the org claim.
Token shape
A verified token exposes the following standard claims:
| Claim | Type | Description |
|-------|------|-------------|
| sub | string (UUID) | User identifier |
| org | string (UUID) | Organization the token was issued for |
| exp | number | Expiry (Unix epoch seconds) |
| iat | number | Issued-at timestamp |
| scope | string | Space-delimited OAuth scopes |
| data | object (optional) | Enriched identity envelope |
Enriched identity (data envelope)
Tokens minted with the enrichment backend include a data claim:
~~~json { "sub": "usr-uuid", "org": "org-uuid", "data": { "email": "alice@example.com", "roles": "owner,org_admin" } } ~~~
data.email— the verified email address of the authenticated user.data.roles— comma- or space-delimited list of roles assigned to the user in the org.
Tokens without a data envelope (older or service-credential tokens) are still valid — the SDKs return an empty roles list and null email so existing code continues to work.
SDK availability
| SDK | Package | Source |
|-----|---------|--------|
| Rust | buttrbase-sdk on crates.io | buttrbase-sdk-rust |
| Node.js | @buttrbase/sdk on npm | buttrbase-sdk-node |
| Python | buttrbase-sdk on PyPI | buttrbase-sdk-python |
| Go | github.com/buttrbase/sdk-go | buttrbase-sdk-go |
Select an SDK from the sidebar to see installation steps and a working token-verification example.