NL · ฿

1 THB = 100 credits · andere valuta volgens de laatste wisselkoers

Inloggen
REST API · v1 · JSON

SIMBOX 24/7 API

SMS OTP-API voor ontwikkelaars: huur virtuele nummers en ontvang verificatiecodes via REST-API en webhooks, met codevoorbeelden in curl, PHP, Python en Node.js

API-sleutel aanmaken Bekijk 10 voorbeelden
REST · JSONOndertekende webhooksInsluitbare sms-inboxPublieke API zonder sleutelAutomatische terugbetaling

Aan de slag

Base URLhttps://simbox247.com/api/v1
FormatJSON · UTF-8
Rate limit30/min (public) · 300/min (key)
curl -s https://simbox247.com/api/v1/me \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

# buy an OTP number
curl -s -X POST https://simbox247.com/api/v1/otp/buy \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret" \
  -H "Content-Type: application/json" \
  -d '{"country":"usa","service":"google"}'

Authenticatie

Maak een API-sleutel aan bij Instellingen en stuur die mee in de Authorization-header. Houd de sleutel geheim — zet hem nooit in frontendcode.

Authorization: Bearer sb_xxxxxxxx.your_secret

Foutcodes en limieten

HTTPcodeBetekenis
401UNAUTHORIZEDMissing or invalid API key
404NOT_FOUNDUnknown endpoint, number or order
409RENT_FAILED · OTP_FAILED · ESIM_FAILEDNot enough credits, sold out, or provider unavailable (see message)
429RATE_LIMITEDToo many requests — retry after a minute
503API_DISABLEDAPI temporarily disabled

Publieke data (geen sleutel)

GET/countriesList countries that have free public numbers.
curl -s https://simbox247.com/api/v1/countries

Response 200

{
    "success": true,
    "data": [
        {
            "country": "us",
            "name": "United States",
            "dial": "1",
            "public_numbers": 12
        }
    ]
}
GET/numbersList free public numbers, newest SMS first.
countrystringISO code, e.g. us (optional)
curl -s https://simbox247.com/api/v1/numbers

Response 200

{
    "success": true,
    "data": [
        {
            "id": 17,
            "number": "+15550001111",
            "country": "us",
            "last_sms_at": 1796312643
        }
    ]
}
GET/numbers/{id}/messagesMessages on a public number (last 24 h). Poll with since=<last id>.
sinceintReturn messages with id greater than this
curl -s https://simbox247.com/api/v1/numbers/{id}/messages

Response 200

{
    "success": true,
    "data": [
        {
            "id": 981,
            "from": "Google",
            "text": "G-482913 is your Google verification code",
            "otp": "482913",
            "received_at": 1796312643
        }
    ]
}

Account en berichten

GET/meAPI keyYour account and credit balance.
curl -s https://simbox247.com/api/v1/me \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

Response 200

{
    "success": true,
    "data": {
        "id": 42,
        "credits": 15700
    }
}
GET/my/numbersAPI keyNumbers you rent or have reserved.
curl -s https://simbox247.com/api/v1/my/numbers \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

Response 200

{
    "success": true,
    "data": [
        {
            "id": 2,
            "number": "+15550002222",
            "country": "us",
            "kind": "private",
            "rented_until": 1796399043
        }
    ]
}
GET/my/messagesAPI keyMessages only you can see (private numbers & reservations).
number_idintFilter by number (optional)
sinceintReturn messages with id greater than this
curl -s https://simbox247.com/api/v1/my/messages \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

Response 200

{
    "success": true,
    "data": [
        {
            "id": 990,
            "number": "+15550002222",
            "from": "Telegram",
            "text": "Telegram code 55120",
            "otp": "55120",
            "received_at": 1796313001
        }
    ]
}

Privénummers

POST/private/rentAPI keyRent a private number. Credits are charged immediately.
countrystringISO code, e.g. us
planstringday | month
curl -s -X POST https://simbox247.com/api/v1/private/rent \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret" \
  -H "Content-Type: application/json" \
  -d '{"country":"code","plan":"month"}'

Response 200

{
    "success": true,
    "data": {
        "id": 2,
        "number": "+15550002222",
        "rented_until": 1796399043
    }
}

OTP kopen

POST/otp/buyAPI keyBuy a one-time number for a service. Auto-refund if no code arrives in time.
countrystring5sim country name, e.g. usa, england
servicestringe.g. facebook, google, telegram
curl -s -X POST https://simbox247.com/api/v1/otp/buy \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret" \
  -H "Content-Type: application/json" \
  -d '{"country":"name","service":"facebook"}'

Response 200

{
    "success": true,
    "data": {
        "id": 311,
        "phone": "+447700900123",
        "status": "waiting",
        "credits": 1200,
        "expires_at": 1796313900
    }
}
GET/otp/{id}API keyOrder status. Poll every 5 s until status is received or refunded.
curl -s https://simbox247.com/api/v1/otp/{id} \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

Response 200

{
    "success": true,
    "data": {
        "id": 311,
        "phone": "+447700900123",
        "status": "received",
        "code": "482913",
        "text": "Your code is 482913"
    }
}

eSIM

GET/esim/packageseSIM data plans with price in credits.
countrystringISO code (optional)
curl -s https://simbox247.com/api/v1/esim/packages

Response 200

{
    "success": true,
    "data": [
        {
            "code": "JP_3_7",
            "country": "jp",
            "name": "Japan 3GB 7 days",
            "data_mb": 3072,
            "days": 7,
            "credits": 19900
        }
    ]
}
POST/esim/buyAPI keyBuy an eSIM plan.
packagestringPackage code from /esim/packages
curl -s -X POST https://simbox247.com/api/v1/esim/buy \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret" \
  -H "Content-Type: application/json" \
  -d '{"package":"\/esim\/packages"}'

Response 200

{
    "success": true,
    "data": {
        "id": 77,
        "status": "pending",
        "package_name": "Japan 3GB 7 days"
    }
}
GET/esim/{id}API keyOrder status and QR code once ready.
curl -s https://simbox247.com/api/v1/esim/{id} \
  -H "Authorization: Bearer sb_xxxxxxxx.your_secret"

Response 200

{
    "success": true,
    "data": {
        "id": 77,
        "status": "ready",
        "qr_url": "https://…/qr.png",
        "iccid": "8985…",
        "activation_code": "LPA:1$…"
    }
}

10 integratievoorbeelden

Kopieer en gebruik direct — vervang alleen je sleutel en nummer

1Een sms-inbox insluiten op je websitePlak één regel code en bezoekers zien binnenkomende berichten live op je site — zonder programmerenHTMLGeen code nodig
<!-- Public number (id from /api/v1/numbers) -->
<iframe src="https://simbox247.com/embed/17" width="100%" height="420"
        style="border:0;border-radius:14px" loading="lazy"></iframe>

<!-- Your private number: create a share link on the number page, then -->
<iframe src="https://simbox247.com/embed/s/YOUR_SHARE_TOKEN?theme=dark" width="100%" height="420"
        style="border:0;border-radius:14px"></iframe>
2Berichten tonen in je eigen ontwerp (JavaScript)Haal berichten op via de publieke API en toon ze in je eigen ontwerp, elke 4 seconden bijgewerkt — geen sleutelJavaScriptGeen sleutel nodig
<ul id="sms"></ul>
<script>
const API = 'https://simbox247.com/api/v1', NUMBER_ID = 17;
let since = 0;
async function poll() {
  const r = await fetch(`$https://simbox247.com/api/v1/numbers/${NUMBER_ID}/messages?since=${since}`);
  const { data } = await r.json();
  data.reverse().forEach(m => {
    since = Math.max(since, m.id);
    const li = document.createElement('li');
    li.textContent = `${m.from}: ${m.text}` + (m.otp ? `  [code ${m.otp}]` : '');
    document.getElementById('sms').prepend(li);
  });
}
poll(); setInterval(poll, 4000);
</script>
3WordPress-plug-in (shortcode)Zet [simbox_inbox id="17"] op een willekeurige WordPress-pagina om een sms-inbox te tonenPHPWordPress
<?php
/* Plugin Name: SIMBOX Inbox */
add_shortcode('simbox_inbox', function ($atts) {
    $id = (int)($atts['id'] ?? 0);
    $res = wp_remote_get("https://simbox247.com/api/v1/numbers/{$id}/messages", ['timeout' => 8]);
    $rows = json_decode(wp_remote_retrieve_body($res), true)['data'] ?? [];
    $html = '<ul class="simbox-inbox">';
    foreach ($rows as $m) {
        $html .= '<li><b>' . esc_html($m['from']) . '</b> ' . esc_html($m['text']) . '</li>';
    }
    return $html . '</ul>';
});
4Geautomatiseerd testen van registratie (Python)Koop een OTP-nummer, wacht op de code en gebruik die in je testscript. Geen code = automatische terugbetaling.PythonQA
import time, requests

API, H = 'https://simbox247.com/api/v1', {'Authorization': 'Bearer sb_xxxxxxxx.your_secret'}

def get_code(service='google', country='usa', timeout=600):
    o = requests.post(f'https://simbox247.com/api/v1/otp/buy', json={'service': service, 'country': country}, headers=H).json()['data']
    print('Enter this number in your app:', o['phone'])
    end = time.time() + timeout
    while time.time() < end:
        s = requests.get(f"https://simbox247.com/api/v1/otp/{o['id']}", headers=H).json()['data']
        if s['status'] == 'received':
            return s['code']
        if s['status'] == 'refunded':
            return None
        time.sleep(5)

print('code =', get_code())
5Sms ontvangen in je systeem via webhooks (Node.js)Elk bericht naar je privénummers gaat direct naar je server; controleer de handtekening voordat je opslaatNode.jsWebhook
import express from 'express';
import crypto from 'node:crypto';

const SECRET = process.env.SIMBOX_WEBHOOK_SECRET;
const app = express();

app.post('/sms-hook', express.raw({ type: '*/*' }), (req, res) => {
  const p = Object.fromEntries(String(req.get('X-Simbox-Signature')).split(',').map(x => x.split('=')));
  const calc = crypto.createHmac('sha256', SECRET).update(p.t + '.' + req.body).digest('hex');
  if (Math.abs(Date.now() / 1000 - +p.t) > 300 || calc !== p.v1) return res.sendStatus(401);
  const { data } = JSON.parse(req.body);
  console.log(`New SMS on ${data.number} from ${data.from}: ${data.text}`);
  // save to your database here
  res.sendStatus(200);
});

app.listen(3000);
6OTP-codes naar de Telegram-groep van het team sturen (PHP)Het hele team ziet codes tegelijk in een Telegram-groep via webhooksPHPTelegram
<?php
// sms-hook.php — set this URL as your webhook in SIMBOX settings
$raw = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_SIMBOX_SIGNATURE'] ?? ''), $sig);
$ok = hash_equals(hash_hmac('sha256', ($sig['t'] ?? '') . '.' . $raw, 'YOUR_WEBHOOK_SECRET'), $sig['v1'] ?? '');
if (!$ok || abs(time() - (int)$sig['t']) > 300) { http_response_code(401); exit; }

$d = json_decode($raw, true)['data'];
$text = "📩 {$d['number']}\nFrom: {$d['from']}\n{$d['text']}" . ($d['otp'] ? "\nCode: {$d['otp']}" : '');
file_get_contents('https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage?' . http_build_query([
    'chat_id' => 'YOUR_GROUP_CHAT_ID', 'text' => $text,
]));
7Berichten naar de Discord van het team sturenKoppel onze webhook aan een Discord-kanaal en krijg direct een melding bij elke smsNode.jsDiscord
// inside your verified /sms-hook handler (see the webhook example)
const { data } = JSON.parse(req.body);
await fetch('https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    content: `**${data.number}** ← ${data.from}\n${data.text}` + (data.otp ? `\n\`${data.otp}\`` : ''),
  }),
});
8Elk bericht vastleggen in Google SheetsGebruik Google Apps Script om webhooks te ontvangen en automatisch rijen aan een sheet toe te voegen — ideaal voor teamadministratieApps ScriptGoogle Sheets
// Extensions → Apps Script → Deploy → Web app (Anyone).
// Use  <web-app-url>?key=YOUR_PRIVATE_KEY  as the webhook URL in SIMBOX settings.
// (Apps Script cannot read request headers, so a private key in the URL protects the sheet.)
const KEY = 'YOUR_PRIVATE_KEY';
function doPost(e) {
  if (e.parameter.key !== KEY) return ContentService.createTextOutput('forbidden');
  const d = JSON.parse(e.postData.contents).data;
  SpreadsheetApp.getActiveSpreadsheet().getSheetByName('SMS')
    .appendRow([new Date(d.received_at * 1000), d.number, d.from, d.text, d.otp || '']);
  return ContentService.createTextOutput('ok');
}
9Geautomatiseerde end-to-end-webtests (Playwright)Laat een testbot het nummer invullen, op de OTP wachten en die intypen — werkt in CITypeScriptCI
import { test, expect } from '@playwright/test';
const API = 'https://simbox247.com/api/v1', H = { Authorization: `Bearer ${process.env.SIMBOX_KEY}` };

test('sign-up with phone OTP', async ({ page, request }) => {
  const { data: o } = await (await request.post(`$https://simbox247.com/api/v1/otp/buy`, { headers: H,
    data: { service: 'other', country: 'usa' } })).json();
  await page.goto('https://your-app.example/signup');
  await page.fill('#phone', o.phone);
  await page.click('text=Send code');
  let code = '';
  for (let i = 0; i < 60 && !code; i++) {
    const { data } = await (await request.get(`$https://simbox247.com/api/v1/otp/${o.id}`, { headers: H })).json();
    code = data.code || ''; if (!code) await page.waitForTimeout(5000);
  }
  await page.fill('#otp', code);
  await expect(page.locator('text=Welcome')).toBeVisible();
});
10Verkoop eSIM's in je app of op je websiteToon eSIM-bundels, plaats bestellingen en toon de QR-code die de klant scantPHPeSIM
<?php
$api = 'https://simbox247.com/api/v1';
$h = ['Authorization: Bearer sb_xxxxxxxx.your_secret', 'Content-Type: application/json'];
$call = function ($method, $path, $body = null) use ($api, $h) {
    $ch = curl_init($api . $path);
    curl_setopt_array($ch, [CURLOPT_CUSTOMREQUEST => $method, CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => $h, CURLOPT_POSTFIELDS => $body ? json_encode($body) : null]);
    return json_decode(curl_exec($ch), true)['data'];
};

$plans = $call('GET', '/esim/packages?country=jp');          // show these to your customer
$order = $call('POST', '/esim/buy', ['package' => $plans[0]['code']]);
do { sleep(3); $o = $call('GET', '/esim/' . $order['id']); } while ($o['status'] === 'pending');
echo '<img src="' . htmlspecialchars($o['qr_url']) . '" alt="eSIM QR">';

Webhooks

Vul je HTTPS-URL in bij Instellingen. Elke sms naar je nummers wordt daar direct naartoe gestuurd, met een handtekening om te verifiëren.

POST https://your-site.com/sms-hook
X-Simbox-Signature: t=1796313001,v1=5f2c…(hex)

{
    "event": "sms.received",
    "data": {
        "id": 990,
        "number": "+15550002222",
        "from": "Telegram",
        "text": "Telegram code 55120",
        "otp": "55120",
        "received_at": 1796313001
    }
}

Handtekening verifiëren

<?php
$raw = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_SIMBOX_SIGNATURE'] ?? ''), $sig);
$calc = hash_hmac('sha256', $sig['t'] . '.' . $raw, 'YOUR_WEBHOOK_SECRET');
if (abs(time() - (int)$sig['t']) > 300 || !hash_equals($calc, $sig['v1'] ?? '')) {
  http_response_code(401); exit;
}
$event = json_decode($raw, true); // $event['data']['otp']