> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sodacards.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Official client libraries for TypeScript, Python, Go and PHP.

We publish an official SDK for four languages. Each is **generated from this API's
OpenAPI specification and regenerated whenever the API changes**, so a client never
drifts from the contract. Under the hood every SDK sends the same requests you see
in the [API reference](/api-reference) — pick the one for your stack.

<Note>
  Every call is authenticated with an API key from the developer dashboard, prefixed
  `sc_live_` (production) or `sc_test_` (sandbox). Load it from an environment
  variable — never commit a key. The examples below read `SODACARDS_API_KEY`.
</Note>

## TypeScript

```bash theme={null}
npm add @sodacards/sdk
```

```typescript theme={null}
import { Sodacards } from "@sodacards/sdk";

const sodacards = new Sodacards({ apiKeyAuth: process.env.SODACARDS_API_KEY });

const catalog = await sodacards.listCatalog();
console.log(catalog);
```

Published as an ES module. `pnpm add`, `bun add` and `yarn add` work too.

## Python

```bash theme={null}
pip install sodacards
```

```python theme={null}
import os
import sodacards

config = sodacards.Configuration(host="https://api.sodacards.com")
config.api_key["ApiKeyAuth"] = os.environ["SODACARDS_API_KEY"]
client = sodacards.DefaultApi(sodacards.ApiClient(config))

catalog = client.list_catalog()
print(catalog)
```

Requires Python 3.10 or newer.

## Go

```bash theme={null}
go get github.com/SODACARDS/sodacards-go
```

```go theme={null}
client := sodacards.NewAPIClient(sodacards.NewConfiguration())
auth := context.WithValue(context.Background(), sodacards.ContextAPIKeys,
    map[string]sodacards.APIKey{"ApiKeyAuth": {Key: os.Getenv("SODACARDS_API_KEY")}})

catalog, _, err := client.DefaultAPI.ListCatalog(auth).Execute()
```

## PHP

```bash theme={null}
composer require sodacards/sdk
```

```php theme={null}
$config = Sodacards\Configuration::getDefaultConfiguration()
    ->setApiKey('X-API-Key', getenv('SODACARDS_API_KEY'));
$client = new Sodacards\Api\DefaultApi(new GuzzleHttp\Client(), $config);

$catalog = $client->listCatalog();
```

## Per-endpoint examples

Every endpoint in the [API reference](/api-reference) carries a ready-to-copy
snippet in all four languages — placing an order, revealing codes, registering a
webhook, and the rest. The SDKs also surface typed errors that mirror the machine
[error codes](/errors), so you branch on the same values the raw API returns.
