# SDKs, CLI and Postman

> Official libraries for Node, Python and PHP (Laravel), the wapitick CLI, and the Postman collection.

| | Install | Source |
|---|---|---|
| Node / TypeScript | `npm i @wapitick/node` | `sdks/node` |
| Python | `pip install wapitick` | `sdks/python` |
| PHP / Laravel | `composer require wapitick/wapitick-php` | `sdks/php` |
| CLI | `npx wapitick` | `sdks/cli` |
| Postman | import `wapitick.postman_collection.json` | `docs/api` |

All three libraries: helpers for the common jobs (send text and templates, upsert contacts, webhook endpoints, test
mode), any other operation by its operationId, automatic `Idempotency-Key` on writes, retries on 429 and 5xx with
backoff, typed errors carrying the problem `code`, and `verifyWebhook()` for both signature styles. They are generated
from the OpenAPI document (operation tables and Node types) with a hand-written layer on top.

```ts
import { Wapitick } from "@wapitick/node";
const wapitick = new Wapitick(); // reads WAPITICK_API_KEY
await wapitick.request("GET", "/v1/contacts", { query: { limit: 10 } });
```

CLI:

```bash
npx wapitick login --key wk_test_...
npx wapitick listen --forward-to http://localhost:3000/webhooks
npx wapitick trigger message.received
npx wapitick logs tail --errors
npx wapitick send --to +15550100001 --text "Hello"
```

## OAuth for partners

Apps that act for many businesses use OAuth 2.1 (`/oauth/authorize`, `/oauth/token`, PKCE). Server-to-server
partners with a **confidential** app can use `grant_type=client_credentials`: the token acts as the member who
created the app, limited to the app's scopes and that member's role, and stops working if the member leaves.
