Skip to main content

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, PHP, Ruby, and Go.

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.

Ruby

Install the SendLayer Ruby SDK via RubyGems:
gem install sendlayer

Validate Installation

Create a file (for example, check_install.rb) and run:
check_install.rb
require 'sendlayer'

sendlayer = SendLayer::SendLayer.new('your-api-key')
puts "SendLayer initialized: #{!sendlayer.nil?}"
Replace 'your-api-key' with your actual API key. See our Ruby SDK guide for full usage examples.

Go

Install the SendLayer Go SDK using go get:
go get github.com/sendlayer/sendlayer-go

Validate Installation

Create a file (for example, check_install.go) and run:
check_install.go
package main

import (
	"fmt"
	"github.com/sendlayer/sendlayer-go"
)

func main() {
	sl := sendlayer.New("your-api-key")
	fmt.Println("SendLayer initialized:", sl != nil)
}
Replace 'your-api-key' with your actual API key. See our Go 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+)
I