Install the package
TypeScript setup
pindo-sms ships with TypeScript definitions at dist/index.d.ts. No additional @types package is required — types are available automatically after installation.
Make sure your tsconfig.json includes the following compiler options:
tsconfig.json
Set up your API token
Pindo SMS authenticates every request using your API token. Store it as an environment variable so it is never hard-coded in source files..env
dotenv:
Initialize the client
ImportPindoSMS and create an instance with your token:
Constructor parameters
ThePindoSMS constructor accepts three parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
token | string | — | Your Pindo API token (required) |
baseUrl | string | https://api.pindo.io | Base URL for the Pindo API |
version | string | v1 | API version string |
baseUrl or version if you are targeting a non-default endpoint: