Overview

This guide shows you how to install the SendLayer SDKs for popular languages so you can start integrating quickly. We currently provide SDKs for Node.js, Python, and PHP.

Prerequisites

Before using the SendLayer API, make sure you’ve:

Node.js

Install the SendLayer Node.js SDK using your preferred package manager.
npm install sendlayer

Validate Installation

Create a file (for example, checkInstall.js) and run a quick import:
checkInstall.js
import { SendLayer } from 'sendlayer';

const sendlayer = new SendLayer('your-api-key');
console.log('SendLayer initialized:', !!sendlayer);
Replace 'your-api-key' with your actual API key. See our Node.js SDK guide for full usage examples.

Python

Install the SendLayer Python SDK via pip:
pip install sendlayer

Validate Installation

Create a file (for example, check_install.py) and run:
check_install.py
from sendlayer import SendLayer

sendlayer = SendLayer('your-api-key')
print('SendLayer initialized:', bool(sendlayer))
Replace 'your-api-key' with your actual API key. See our Python SDK guide for full usage examples.

PHP

Install the SendLayer PHP SDK with Composer:
composer require sendlayer/sendlayer-php

Validate Installation

Create a file (for example, checkInstall.php) and run:
checkInstall.php
<?php
require_once 'vendor/autoload.php';

use SendLayer\SendLayer;

$sendlayer = new SendLayer('your-api-key');
echo 'SendLayer initialized: ' . ($sendlayer ? 'true' : 'false');
Replace 'your-api-key' with your actual API key. See our PHP SDK guide for full usage examples.

Next Steps

Troubleshooting

  • Ensure your environment can make outbound HTTPS requests
  • Verify your API key is correct and active
  • If installation fails, update your package manager (npm, yarn, pip, or composer) and try again
  • Check language version requirements (Node.js 16+, Python 3.8+, PHP 7.4+)