FG FFGlory Gateway Docs
API Reference

FFGlory Gateway — Integration Docs

A single PHP endpoint that lets any website, Telegram bot, or app talk to the FFGlory Reseller API using nothing but an action name and a reseller API key.

https://www.api.ffglory.abhromodz.in/api/v1

01 Overview

What the gateway does and why it exists.

The real FFGlory Reseller API requires a specific HTTP method per endpoint, a shared x-api-key master key header, and a differently-shaped body for every action. This gateway hides all of that behind one endpoint: https://www.api.ffglory.abhromodz.in/api/v1.

Every integration — a website's backend, a Telegram bot, a mobile app, a cron script — calls that same URL the same way: send an action name and the caller's own api_key, get back FFGlory's JSON response, unchanged.

02 Setup

Already deployed if the endpoint badge above resolves to your real domain.

  1. Requires PHP with the curl extension — enabled by default on virtually every cPanel host.
  2. The gateway lives at api/v1.php with an .htaccess rewrite so it answers at the clean URL /api/v1 (no redirect, so POST bodies are never dropped).
  3. No config file, no environment variables, no terminal access needed.
  4. Visit https://www.api.ffglory.abhromodz.in/api/v1 directly in a browser — with no action param it returns a small JSON self-check confirming the deployment and showing its own detected URL.

03 Request Format

Every call needs two things, sent as GET query params, POST form fields, or a POST JSON body.

FieldRequiredDescription
actionAlwaysWhich action to run — see the table below.
api_keyMost actionsThe caller's own FFGlory reseller key (ak_...).
other fieldsDependsPassed straight through as the JSON body (POST) or query string (GET).

Scroll table sideways →

The gateway automatically picks the right HTTP method and attaches FFGlory's master key — callers never see or handle it. The response is always JSON, with FFGlory's own HTTP status code passed through unchanged.
GET example
GET https://www.api.ffglory.abhromodz.in/api/v1?action=balance&api_key=ak_xxx
POST example (JSON body)
POST https://www.api.ffglory.abhromodz.in/api/v1Content-Type: application/json

{"action": "launch-group", "api_key": "ak_xxx", "region": "me", "clan_id": "123456789"}
POST example (form-encoded)
action=redeem-coupon&api_key=ak_xxx&code=AB12-CD34-EF56

04 Available Actions

Every action the gateway supports, mapped 1:1 to the FFGlory Reseller API.

ActionKeyExtra fieldsWhat it does
meYes—Account info: username, credit balances, max groups.
signupNousername, passwordRegister a new FFGlory account.
pricingNo—List regions and per-credit pricing (public).
launch-groupYesregion, clan_idLaunch a glory group for a clan (deducts 1 credit).
my-groupsYes—List the caller's groups and their status.
group-actionYesaction (restart/stop/delete/get-glory/get-clan-info), group_idManage or query one group.
create-couponYesbasic_credits, premium_creditsCreate a coupon backed by the caller's own credits.
my-couponsYes—List coupons the caller created.
redeemed-couponsYes—List coupons the caller has redeemed.
redeem-couponYescodeRedeem a coupon code for credits.
cancel-couponYescodeCancel an active coupon and refund its credits.
transactionsYes—List the last 50 purchase transactions.
cancel-transactionYestransaction_idCancel a pending transaction.
group-historyYes—Full group history with glory snapshots.
glory-progressionYesgroup_idDetailed glory timeline for one group.
activity-logYes—Last 200 account activity events.
notificationsYes—Pending notifications (cleared once read).

Scroll table sideways →

Note: group-action's inner action field (which sub-action to run) is separate from the gateway's own top-level action=group-action.

05 Website Integration

Call the gateway from the browser, a PHP backend, or a plain HTML form.

Client-side JavaScript (fetch)

const res = await fetch('https://www.api.ffglory.abhromodz.in/api/v1', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'launch-group',
    api_key: 'ak_xxx',
    region: 'me',
    clan_id: '123456789'
  })
});
const data = await res.json();
console.log(data);
Careful: avoid putting a real reseller api_key directly in public front-end JavaScript — see Security Notes below.

PHP backend (cURL)

<?php
$ch = curl_init('https://www.api.ffglory.abhromodz.in/api/v1');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'action'  => 'my-groups',
        'api_key' => 'ak_xxx',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);

Plain HTML form

<form action="https://www.api.ffglory.abhromodz.in/api/v1" method="POST">
  <input type="hidden" name="action" value="redeem-coupon">
  <input type="hidden" name="api_key" value="ak_xxx">
  <input type="text" name="code" placeholder="Coupon code">
  <button type="submit">Redeem</button>
</form>

06 Telegram Bot Integration

Example using python-telegram-bot and requests.

import requests
from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes

GATEWAY = 'https://www.api.ffglory.abhromodz.in/api/v1'

def call_gateway(action: str, api_key: str, **fields) -> dict:
    payload = {'action': action, 'api_key': api_key, **fields}
    r = requests.post(GATEWAY, json=payload, timeout=30)
    return r.json()

async def balance(update: Update, context: ContextTypes.DEFAULT_TYPE):
    user_api_key = get_stored_key(update.effective_user.id)  # your own storage
    data = call_gateway('me', user_api_key)
    if 'error' in data:
        await update.message.reply_text(f"Error: {data['error']}")
        return
    await update.message.reply_text(
        f"Basic: {data['basic_credits']}  Premium: {data['premium_credits']}"
    )

async def launch(update: Update, context: ContextTypes.DEFAULT_TYPE):
    user_api_key = get_stored_key(update.effective_user.id)
    region, clan_id = context.args[0], context.args[1]
    data = call_gateway('launch-group', user_api_key, region=region, clan_id=clan_id)
    if 'error' in data:
        await update.message.reply_text(f"Error: {data['error']}")
        return
    await update.message.reply_text(f"Launched group: {data['group_id']}")

app = ApplicationBuilder().token('YOUR_TELEGRAM_BOT_TOKEN').build()
app.add_handler(CommandHandler('balance', balance))
app.add_handler(CommandHandler('launch', launch))
app.run_polling()
Each Telegram user can store their own FFGlory api_key (e.g. via a /setkey ak_xxx command saved to a small database), so one bot can serve many resellers or customers, each billed against their own credits.

07 Error Handling

Errors always come back as JSON with an error field, e.g. {"error": "Insufficient credits"}.

StatusSourceMeaning
400GatewayMissing action, unknown action, or missing api_key for an action that needs one.
502GatewayCould not reach FFGlory's servers (network/timeout).
401FFGloryInvalid api_key.
402FFGloryInsufficient credits (response includes balance + prices).
403FFGloryMissing permissions, max groups reached, or max groups per clan reached.
404FFGloryGroup not found or not owned by this account.
409FFGloryConflicting operation already in progress.
429FFGloryRate limited.

Scroll table sideways →

Always check the HTTP status code and look for an error key before trusting the rest of the response — don't assume success just because a request completed.

08 Security Notes

  • Always serve over HTTPS. api_key travels in plain query strings or JSON bodies with no extra encryption from the gateway itself — TLS is what protects it in transit.
  • Never embed a real reseller api_key in public front-end JavaScript, a mobile app binary, or a public repo. Anyone who reads it can spend that account's credits. Keep the key server-side and have the browser/app call your own backend, which then calls the gateway.
  • Give each end customer their own FFGlory account and key where possible (via the signup action), instead of sharing one reseller key across many users — this keeps usage traceable per customer and limits the damage if one key leaks.
  • Respect FFGlory's own rate limits (e.g. 5 coupon-redeem attempts per 60 seconds) — the gateway does not add its own throttling or caching.
  • Consider adding your own layer of auth in front of this gateway (an IP allowlist, a shared secret header, or per-caller rate limiting) if it's reachable from the public internet and used by third parties you don't fully trust.