Dokumentasi API
API kami mengikuti format standar pasar: setiap panggilan adalah permintaan POST ke satu alamat tunggal, dengan kunci Anda (key) dan sebuah aksi (action). Skrip reseller yang sudah ada tetap kompatibel tanpa perubahan. Buat kunci Anda dari area akun, bagian “API”.
Alamat: https://sociallikeyou.com/api/v2
Metode: POST · Respons: JSON
Liste des services
| Parameter | Deskripsi |
|---|---|
key | Kunci API Anda |
action | services |
Contoh respons
[{"service":1,"name":"…","type":"Default","category":"…","rate":"0.9","min":"10","max":"10000","refill":false,"cancel":false}]
Passer une commande
| Parameter | Deskripsi |
|---|---|
key | Kunci API Anda |
action | add |
service | ID du service |
link | Lien |
quantity | Quantité |
idempotency_key | Facultatif : identifiant unique pour éviter les doublons en cas de nouvel essai |
Contoh respons
{"order":23501}
Statut d’une commande
| Parameter | Deskripsi |
|---|---|
key | Kunci API Anda |
action | status |
order | ID de la commande |
Contoh respons
{"charge":"0.27819","start_count":"3572","status":"Partial","remains":"157","currency":"EUR"}
Statut de plusieurs commandes (100 max)
| Parameter | Deskripsi |
|---|---|
key | Kunci API Anda |
action | status |
orders | IDs séparés par des virgules |
Contoh respons
{"1":{"charge":"0.27","start_count":"0","status":"Completed","remains":"0","currency":"EUR"},"10":{"error":"Incorrect order ID"}}
Solde du compte
| Parameter | Deskripsi |
|---|---|
key | Kunci API Anda |
action | balance |
Contoh respons
{"balance":"100.84","currency":"EUR"}
REST API (JSON) dan notifikasi
Untuk pengembangan baru, REST API tersedia di https://sociallikeyou.com/api/rest/v1 dengan header Authorization: Bearer KUNCI_ANDA : GET /services, GET /balance, GET /orders, GET /orders/{id} dan POST /orders. Pembuatan pesanan memerlukan header Idempotency-Key, sehingga percobaan ulang setelah koneksi terputus tidak pernah membuat pesanan ganda. Spesifikasi lengkap dalam format OpenAPI: openapi.json.
Notifikasi: masukkan alamat HTTPS di area akun Anda (bagian API). Setiap kali status berubah, kami mengirim POST JSON dengan header X-Webhook-Signature: t=…,v1=…. Untuk memverifikasinya, hitung HMAC-SHA256 dari t.corps dengan secret Anda. Jika gagal, pengiriman dicoba ulang hingga 10 kali, selama sekitar 24 jam.
Kesalahan
Kesalahan bisnis mengembalikan {"error": "message"}. Kunci tidak valid: HTTP 401. Terlalu banyak permintaan: HTTP 429 (batas default: 120 permintaan per menit per kunci).
Contoh
PHP
<?php
$ch = curl_init("https://sociallikeyou.com/api/v2");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query([
"key" => "VOTRE_CLE", "action" => "add",
"service" => 1, "link" => "https://exemple.com/page", "quantity" => 1000,
]),
]);
$reponse = json_decode(curl_exec($ch), true);
Python
import requests
r = requests.post("https://sociallikeyou.com/api/v2", data={"key": "VOTRE_CLE", "action": "balance"}, timeout=30)
print(r.json())
JavaScript (Node.js)
const r = await fetch("https://sociallikeyou.com/api/v2", {
method: "POST",
body: new URLSearchParams({ key: "VOTRE_CLE", action: "services" }),
});
console.log(await r.json());