Skip to content

Languages

Python

Prerequisites

Python 3 with the requests package (pip install requests). Portal email, API key, and approved senderID.

Authentication

Pass auth=(email, api_key) to requests.post.

SEND_SINGLE example

Equivalent to the documented curl POST:

import requests

email = 'YOUR_EMAIL'
api_key = 'YOUR_API_KEY'
url = 'https://portal.velobotix.app/api.php?FUN=SEND_SINGLE'

r = requests.post(
    url,
    auth=(email, api_key),
    headers={'Content-Type': 'application/json'},
    json={
        'senderID': 'VeloBotix',
        'to': '0701234567',
        'msg': 'Your OTP is 483920. Valid for 5 minutes.',
    },
    timeout=30,
)
print(r.status_code, r.text)

Common mistakes

Using data= instead of json= and forgetting Content-Type.

Hard-coding secrets in notebooks that get shared.

Not checking r.status_code before parsing the body.

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