Skip to content

Languages

Node.js

Prerequisites

Node.js 18+ (built-in fetch) or any environment with fetch. Portal credentials and approved senderID.

Authentication

Set Authorization: Basic with base64(email:apiKey).

SEND_SINGLE example

Equivalent to the documented curl POST:

const email = 'YOUR_EMAIL';
const apiKey = 'YOUR_API_KEY';
const auth = Buffer.from(`${email}:${apiKey}`).toString('base64');

const res = await fetch('https://portal.velobotix.app/api.php?FUN=SEND_SINGLE', {
  method: 'POST',
  headers: {
    Authorization: `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    senderID: 'VeloBotix',
    to: '0701234567',
    msg: 'Your OTP is 483920. Valid for 5 minutes.',
  }),
});

const text = await res.text();
console.log(res.status, text);

Common mistakes

Calling the API from browser code and exposing the API key.

Omitting FUN=SEND_SINGLE on the query string.

Using wrong number format — prefer 07XXXXXXXX.

Create account

Sign up in the portal and get your API key — username is your email, password is the key.

Open portal — get API key