SDKs & Libraries - Developers

Home / SDKs & Libraries - Developers

SDKs & Libraries

Use our official SDKs to integrate RukkyHub faster. All SDKs use the same action-based API pattern under the hood. The source code is open and hosted on GitHub:

github.com/xat43/Rukkyhub_sdk_repo — official SDKs, examples, and release notes.
All SDKs send POST requests to the single API endpoint with action, key, and other parameters. The raw cURL approach works with any language.

PHP Example (cURL)

<?php
$apiUrl = "https://developers.rukkyhub.com/api/v1";
$apiKey = getenv("SMM_API_KEY");

function rukkyhub_request($url, $key, $data) {
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => http_build_query($data),
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 20,
        CURLOPT_HTTPHEADER => [
            "X-API-KEY: {$key}",
            "Accept: application/json",
        ],
    ]);
    $raw = curl_exec($ch);
    $http = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    if ($raw === false) throw new Exception("cURL error");
    return json_decode($raw, true);
}

// Check balance
$result = rukkyhub_request($apiUrl, $apiKey, ["action" => "balance"]);
print_r($result);

// Place an SMM order
$order = rukkyhub_request($apiUrl, $apiKey, [
    "action" => "add",
    "service" => 123,
    "link" => "https://example.com",
    "quantity" => 1000
]);
echo "Order ID: " . $order["order"];

// Place a Custom Comments order (one comment per line)
$order = rukkyhub_request($apiUrl, $apiKey, [
    "action" => "add",
    "service" => 4519,
    "link" => "https://instagram.com/post/123",
    "comments" => "Great post!\nLove this content\nKeep it up\nVery inspiring\nThanks for sharing"
]);
echo "Order ID: " . $order["order"];

// Check order status (includes api_order_id when placed)
$status = rukkyhub_request($apiUrl, $apiKey, [
    "action" => "status",
    "order" => $order["order"]
]);
print_r($status);

// Cancel the order (if the service allows cancel)
$cancel = rukkyhub_request($apiUrl, $apiKey, [
    "action" => "cancel",
    "order" => $order["order"]
]);
print_r($cancel);

// Buy airtime
$vtu = rukkyhub_request($apiUrl, $apiKey, [
    "action" => "vtu_airtime",
    "service_name" => "mtn",
    "phone" => "08012345678",
    "amount" => 100,
    "pin" => "1234"
]);
print_r($vtu);

Node.js Example (fetch)

const apiUrl = "https://developers.rukkyhub.com/api/v1";
const apiKey = process.env.SMM_API_KEY;

async function rukkyhubRequest(action, params = {}) {
  const body = new URLSearchParams({ ...params, action });
  const res = await fetch(apiUrl, {
    method: "POST",
    headers: {
      "X-API-KEY": apiKey,
      "Content-Type": "application/x-www-form-urlencoded",
      "Accept": "application/json"
    },
    body
  });
  return res.json();
}

// Check balance
const balance = await rukkyhubRequest("balance");
console.log(balance);

// Place SMM order
const order = await rukkyhubRequest("add", {
  service: 123,
  link: "https://example.com",
  quantity: 1000
});
console.log("Order ID:", order.order);

// Place Custom Comments order (one comment per line)
const commentOrder = await rukkyhubRequest("add", {
  service: 4519,
  link: "https://instagram.com/post/123",
  comments: "Great post!\nLove this content\nKeep it up\nVery inspiring\nThanks for sharing"
});
console.log("Order ID:", commentOrder.order);

// Check order status (includes api_order_id when placed)
const status = await rukkyhubRequest("status", { order: order.order });
console.log(status);

// Cancel the order (if the service allows cancel)
const cancel = await rukkyhubRequest("cancel", { order: order.order });
console.log(cancel);

// Buy MTN airtime
const vtu = await rukkyhubRequest("vtu_airtime", {
  service_name: "mtn",
  phone: "08012345678",
  amount: 100,
  pin: "1234"
});
console.log(vtu);

Python Example (requests)

import os
import requests

API_URL = "https://developers.rukkyhub.com/api/v1"
API_KEY = os.environ["SMM_API_KEY"]

def rukkyhub_request(action, **params):
    data = {"action": action, **params}
    headers = {"X-API-KEY": API_KEY, "Accept": "application/json"}
    resp = requests.post(API_URL, data=data, headers=headers)
    return resp.json()

# Check balance
print(rukkyhub_request("balance"))

# Place SMM order
order = rukkyhub_request("add", service=123, link="https://example.com", quantity=1000)
print(f"Order ID: {order['order']}")

# Place Custom Comments order (one comment per line)
comment_order = rukkyhub_request("add", service=4519, link="https://instagram.com/post/123", comments="Great post!\nLove this content\nKeep it up\nVery inspiring\nThanks for sharing")
print(f"Order ID: {comment_order['order']}")

# Check order status (includes api_order_id when placed)
status = rukkyhub_request("status", order=order["order"])
print(status)

# Cancel the order (if the service allows cancel)
cancel = rukkyhub_request("cancel", order=order["order"])
print(cancel)

# Buy airtime
vtu = rukkyhub_request("vtu_airtime", service_name="mtn", phone="08012345678", amount=100, pin="1234")
print(vtu)

Supported Service Interfaces

Secure payment gateways, automation providers, and infrastructure.

Rukkyhub processes personal data only to provide services, ensure security, and meet legal requirements. We do not sell user data. By using this site, you consent to our data processing in accordance with GDPR. learn more

Allow