API Reference
v2.4-stable
Dokumentasi API GameID
Panduan lengkap integrasi API validasi game ID untuk platform top-up, e-commerce voucher, dan bot Discord.
Quick Start
Dapatkan API Key gratis dan mulai validasi game ID dalam 3 langkah:
1
Daftar Akun
Buat akun developer gratis. Auto-generate sandbox API key.
2
Pasang API Key
Tambahkan header Authorization: Bearer YOUR_KEY di setiap request.
3
Mulai Validasi
POST game, user_id, zone_id. Dapatkan nickname dalam ~40ms.
Authentication
Semua request API harus menyertakan API key via header:
Authorization: Bearer gid_live_XXXXXXXXXXXXXXXXXX
warning
Jangan pernah expose API key di client-side code (browser, mobile app). Gunakan backend proxy.
Rate Limits
| Paket | Rate Limit | Monthly Quota | Harga |
|---|---|---|---|
| Starter | 5 req/detik | 1.000/bulan | Rp5.000/bln |
| Pro Developer | 35 req/detik | 50.000/bulan | Rp20.000/bln |
| Enterprise | Unlimited | Unlimited | Custom |
IP Whitelist
shield
IP Whitelist Wajib untuk Akses API
Setiap API key harus memiliki minimal 1 IP yang didaftarkan. Request dari IP yang tidak terdaftar akan ditolak dengan error 403.
Cara Setting:
- Buka Dashboard → API Keys
- Klik "Edit" pada bagian Whitelist IP
- Masukkan hingga 3 IP address (format:
192.168.1.1atau CIDR103.144.12.0/24) - Klik Simpan
| Situasi | Hasil |
|---|---|
| Whitelist kosong (belum diisi) | Semua request ditolak |
| IP cocok dengan whitelist | Request diterima |
| IP tidak cocok dengan whitelist | 403 Forbidden |
lightbulb
Untuk development/testing, tambahkan IP server kamu. Untuk production, gunakan IP server/backend yang menjalankan API call.
POST
/v2/verify
Validasi game ID dan dapatkan nickname, region, dan info akun secara real-time.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| game | string | Yes | Game slug: aov, ea-sports-fc-mobile, bloodstrike, codm, ff, genshin, honor-of-kings, honkai-impact-coda, honkai-starrail, love-deepspace, magicchess, mlbb, point-blank, pubg-mobile, sausage, super-sus, undawn, zzz |
| user_id | string | Yes | User ID game / Riot ID |
| zone_id | string | No | Zone ID / Server (opsional) |
Contoh Request
curl -X POST https://gameid.sakuin.id/api/v2/verify \
-H "Authorization: Bearer gid_live_XXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"game": "mlbb",
"user_id": "120485912",
"zone_id": "2604"
}'
Contoh Response (200 OK)
{
"status": true,
"code": 200,
"latency_ms": 386,
"message": "ID ditemukan",
"data": {
"game": "mlbb",
"gameName": "Mobile Legends: Bang Bang",
"username": "X-Ryzen.VIP",
"userId": "120485912",
"zoneId": "2604"
}
}
GET
/v2/games
Daftar lengkap semua game yang didukung oleh API.
GET
/v2/me
Informasi API key yang sedang digunakan: plan, quota, rate limit.
Error Codes
| Code | Meaning |
|---|---|
| 200 | Berhasil - ID valid, nickname ditemukan |
| 400 | Bad Request - Parameter wajib tidak lengkap |
| 401 | Unauthorized - API key tidak ada atau invalid |
| 403 | Forbidden - Quota habis atau IP di-block |
| 404 | Not Found - User ID tidak ditemukan di game |
| 429 | Rate Limited - Terlalu banyak request |
| 500 | Server Error - Gateway game sedang down |
SDKs & Libraries
SDK resmi untuk integrasi lebih mudah. Saat ini sedang dalam pengembangan.
Node.js
Coming Soon
npm i @gameid/sdk
Python
Coming Soon
pip install gameid
PHP (Composer)
Coming Soon
composer require gameid/sdk
Go
Coming Soon
go get github.com/gameid/go-sdk
info
Sementara ini, gunakan HTTP client (axios, fetch, requests) untuk mengakses API langsung. Lihat contoh integrasi di bawah.
Contoh Integrasi
Node.js (axios)
const axios = require('axios');
const res = await axios.post(
'https://gameid.sakuin.id/api/v2/verify',
{ game: 'mlbb', user_id: '120485912', zone_id: '2604' },
{ headers: { Authorization: 'Bearer YOUR_KEY' } }
);
console.log(res.data.data.username);
Python (requests)
import requests
res = requests.post(
'https://gameid.sakuin.id/api/v2/verify',
json={'game': 'mlbb', 'user_id': '120485912',
'zone_id': '2604'},
headers={'Authorization': 'Bearer YOUR_KEY'}
)
print(res.json()['data']['username'])