SDKs

Use AvenoLink from whichever language your team already knows. See what is supported, what each needs, and copy a small wrapper to start with.

No SDK required

AvenoLink is a plain REST API, so you can use it from any language that makes HTTP requests. There is nothing to install and nothing to keep up to date. Helper libraries do the same thing with less typing, but they never do anything the raw API cannot.

  • Every code sample in the docs is plain HTTP, so it works as written.
  • You choose your own HTTP client, so there are no dependency clashes.
  • Moving between languages is easy because the requests are identical.

Supported languages

We publish working examples for all of these languages, with the exact headers and request body.

LanguageRequirements
cURLAny terminal
JavaScriptNode.js 18+ or any modern browser
PythonPython 3.8+ with requests
PHPPHP 7.4+ with cURL
JavaJava 15+
C#.NET 7+
C++C++11 with libcurl
GoGo 1.18+
RustRust with reqwest and tokio
SwiftSwift 5.7+
KotlinKotlin on JVM 11+

Starter wrapper: JavaScript

A small wrapper keeps your key and host in one place and gives the rest of your code a single function to call.

avenolink.js
const HOST = process.env.AVENOLINK_API_HOST ?? "https://api.avenolink.com";

export async function send(channel, apiKey, body) {
  const res = await fetch(`${HOST}/api/v1/send/${channel}`, {
    method: "POST",
    headers: {
      "x-api-key": apiKey,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
  });

  const data = await res.json();
  if (!res.ok) throw new Error(data.message ?? "Request failed");
  return data;
}

// Usage
await send("sms", process.env.AVENOLINK_SMS_KEY, {
  recipients: ["265XXXXXXXXX"],
  sender_id: "AVENOLINK",
  message: "Your verification code is 482913.",
});

Starter wrapper: Python

avenolink.py
import os
import requests

HOST = os.environ.get("AVENOLINK_API_HOST", "https://api.avenolink.com")

def send(channel, api_key, body):
    res = requests.post(
        f"{HOST}/api/v1/send/{channel}",
        json=body,
        headers={"x-api-key": api_key},
        timeout=15,
    )
    res.raise_for_status()
    return res.json()

# Usage
send("sms", os.environ["AVENOLINK_SMS_KEY"], {
    "recipients": ["265XXXXXXXXX"],
    "sender_id": "AVENOLINK",
    "message": "Your verification code is 482913.",
})

Good habits for any language

  • Set a request timeout so a slow network never freezes your app.
  • Retry 429 and 5xx responses with a growing delay, and do not retry 400 or 401.
  • Read keys and the host from environment variables.
  • Log the batch_id of every send to make support and reconciliation easy.
  • Keep API calls on your server, never in client-side code.