# SDKs

Official libraries that build, retry and page the API’s calls for you, turn every failure into a typed exception, and ship custom metrics and log lines.

| Language | Package | Install | Runtime | Docs |
| --- | --- | --- | --- | --- |
| **PHP** | `watchtower15/sdk` | `composer require watchtower15/sdk` | PHP 8.3 or later | [PHP SDK](https://developer.watchtower15.com/sdks/php/) |
| **Node.js** | `@watchtower15/sdk` | `npm install @watchtower15/sdk` | Node.js 22.12 or later | [Node.js SDK](https://developer.watchtower15.com/sdks/node/) |
| **Python** | `watchtower15` | `pip install watchtower15` | Python 3.11 or later | [Python SDK](https://developer.watchtower15.com/sdks/python/) |

## PHP frameworks

The PHP SDK comes with bridges for Laravel (`watchtower15/laravel`), Symfony (`watchtower15/symfony`) and CakePHP (`watchtower15/cakephp`): a bridge requires the core, so you install one package.

## Versions

Each SDK follows [Semantic Versioning](https://semver.org), independently of the API’s `v1`: a new API operation is additive and ships in the next release, and a change to an SDK’s own signatures is a major one.

## Recipes

Code for one job, without an SDK: [AWS Lambda and CloudWatch Logs](https://developer.watchtower15.com/sdks/recipes/aws-lambda/) forwards log lines to log ingest.

**Your first call**

curl:

```bash
curl https://rest.watchtower15.com/v1/me \
  -H "Authorization: Bearer $WT15_API_KEY"
```

PHP:

```php
// composer require watchtower15/sdk
require 'vendor/autoload.php';

$wt15 = WatchTower15\Client::fromEnvironment();
echo $wt15->me()->organisationName;
```

Node.js:

```ts
// npm install @watchtower15/sdk
import { WatchTower15 } from '@watchtower15/sdk';

const wt15 = WatchTower15.fromEnvironment();
console.log((await wt15.me()).organisation.name);
```

Python:

```python
# pip install watchtower15
from watchtower15 import Client

client = Client.from_environment()
print(client.me().organisation.name)
```

**Check the setup (PHP)**

```bash
export WT15_API_KEY=… WT15_METRICS_TOKEN=… WT15_LOGS_TOKEN=…
vendor/bin/watchtower15 test
```

Source: https://developer.watchtower15.com/sdks/
