Appearance color
This choice is saved in your browser and stays the same when Light/Dark mode changes.
Rainbow speed50
PHP Request Example
<?php
$endpoint = 'https://ugi.my.id/panel/external-api/generate';
$apiKey = 'PASTE_MASTER_API_KEY_HERE';
$token = 'PASTE_ACCEPTED_TOKEN_HERE';

$payload = [
    'api_key' => $apiKey,
    'token' => $token,
    'action' => 'quote',
    'game' => 'MLBB', // use a game code from the current panel config
    'duration' => 1,  // use a duration value from the current panel config
    'max_devices' => 1,
    'bulk' => 1,
];

$json = json_encode($payload, JSON_UNESCAPED_SLASHES);
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $json,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Accept: application/json',
        'Content-Length: ' . strlen($json),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 10,
    CURLOPT_TIMEOUT => 30,
]);
$response = curl_exec($ch);
$httpCode = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
$curlError = curl_error($ch);
curl_close($ch);

if ($curlError !== '') {
    throw new RuntimeException('Request error: ' . $curlError);
}

$result = json_decode((string) $response, true);
if (!is_array($result)) {
    throw new RuntimeException('The API returned invalid JSON (HTTP ' . $httpCode . ').');
}
if ($httpCode >= 400 || empty($result['success'])) {
    throw new RuntimeException(($result['message'] ?? 'API request failed.') . ' (HTTP ' . $httpCode . ')');
}

echo 'Owner: ' . htmlspecialchars((string)($result['owner'] ?? ''), ENT_QUOTES, 'UTF-8') . "<br>";
echo 'Reduced: ' . number_format((float)($result['reduced_balance'] ?? 0), 0, ',', '.') . "<br>";
echo 'Remaining: ' . number_format((float)($result['remaining_balance'] ?? 0), 0, ',', '.') . "<br>";
foreach (($result['keys'] ?? []) as $generatedKey) {
    echo htmlspecialchars((string)$generatedKey, ENT_QUOTES, 'UTF-8') . "<br>";
}
?>
Not sure how to set up the configuration on your website?
  • Download the native PHP files below; there is no need to build it from scratch—simply upload these PHP files and open the page on your website.
  • Available Games

    Use the game value exactly as it appears in the following list. This list reflects the current panel configuration.

    Game CodeValue
    ALLALL
    PUBGPUBG
    CODMCODM
    AOVAOV
    HOKHOK
    FFFF
    Available Durations

    Use a numeric value for the duration column. The following prices are per-device rates, before applying the max_devices and bulk multipliers.

    Duration ValueDurationPrice / Device
    11 day - Rp15.000/Device15.000 Rp
    33 day - Rp25.000/Device25.000 Rp
    77 day - Rp50.000/Device50.000 Rp
    3030 day - Rp100.000/Device100.000 Rp
    6060 day - Rp180.000/Device180.000 Rp
    9090 day - Rp270.000/Device270.000 Rp
    Available Parameters
    ParameterRequiredExampleDescription
    actionNoquoteUse quote for a read-only balance/cost check; omit it for normal key generation.
    api_keyYesUGI_...Master API key shown above.
    tokenYesUGI_TK_...Token generated by reseller/admin and ACCEPTED by owner.
    gameYesMLBBManual game list used by the external API generator.
    durationYes1Duration value from the current panel configuration; do not hard-code values from an older installation.
    max_devicesYes1Allowed device count, 1–100.
    bulkNo1Number of keys to generate, 1–100.
    How it works
    1. Reseller/Admin generates a token request.
    2. Owner reviews the request and chooses ACCEPT, REJECT, or DELETE.
    3. Only ACCEPTED tokens can call the external generation endpoint.
    4. Every API request must send both api_key and token.
    5. The external website needs no SQL table; it only sends the request and displays the API response.
    Security rules

    The server checks:

    • Master API key matches exactly.
    • Token exists and status is ACCEPT.
    • Token owner still exists, is active, and is reseller/admin.
    • Invalid, pending, rejected, or deleted tokens cannot generate keys.
    • External generation deducts the token owner's balance using the same price × device × quantity formula as Keys/Generate.
    Global Music

    Music player A–Z

    Temukan lagu dan artis dari berbagai negara, pilih huruf A–Z, lalu putar preview langsung di halaman guest.

    Pilih huruf A–Z atau cari musik.
    Preview audio mengikuti hak akses dan ketersediaan layanan musik di masing-masing negara.