API Documentation

Dokumentasi AxzyeDev API

Panduan lengkap untuk mengakses endpoint AxzyeDev — Alight Motion Premium, Captcha Verify, dan lainnya. Semua request wajib menyertakan autentikasi (API Key atau Bearer token).

01 Overview

AxzyeDev API menyediakan endpoint untuk mengotomasi proses Alight Motion Premium dan verifikasi captcha. Cocok untuk integrasi dari:

  • Website kamu sendiri (frontend) — pakai Bearer token dari Firebase
  • Bot / cmd / cron — pakai X-API-Key
  • Server-to-server (Node.js, PHP, Python, Go) — pakai X-API-Key
Catatan: Halaman internal seperti amprem.html tidak perlu API Key — dia pakai Bearer token dari login Firebase user. API Key khusus buat integrasi eksternal.

02 Base URL

Semua endpoint menggunakan base URL berikut:

https://axzyedev.biz.id/api/v1

03 Autentikasi

API ini mendukung 2 mode autentikasi. Pilih salah satu sesuai kebutuhan:

Mode 1 — API Key (external)

Kirim lewat header X-API-Key. Cocok untuk bot, cmd, server-to-server.

X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxxxxxxxxxx

Mode 2 — Firebase ID Token (web)

Kirim lewat header Authorization: Bearer <idToken>. Cocok untuk website kamu — user login pakai Firebase, ambil ID token, kirim ke API.

Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6...
Jangan expose API Key di frontend publik. Simpan di server atau environment variable. Gunakan Bearer token (Firebase) untuk frontend yang user-facing.

04 Rate Limit

Setiap user (UID) atau API Key dibatasi:

  • 5 akun per 24 jam untuk endpoint /apply-premium
  • Rate limit dihitung dari UID pemilik API Key, bukan dari akun target
  • Regenerate API Key tidak reset rate limit
  • Akunadmin unlimited

Saat limit tercapai, response HTTP 429 dengan info sisa kuota:

{
  "success": false,
  "message": "Rate limit tercapai. Max 5 akun per 24 jam. Sudah terpakai: 5/5.",
  "used": 5,
  "limit": 5
}
POST /api/v1/verify-account
Verify Account
Verifikasi link magic yang diterima di email. Menghasilkan idToken + refreshToken yang nantinya dipakai untuk apply premium.
Headers
X-API-Key string API key kamu — atau pakai Authorization: Bearer
Body
email string Email yang sama dengan yang dipakai di send-magic-link
rawLink string Link verifikasi utuh dari email (mengandung oobCode=...)
Contoh Request
# Verifikasi akun pakai link dari email
curl -X POST "https://axzyedev.biz.id/api/v1/verify-account" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxx" \
  -d '{
    "email":"user@gmail.com",
    "rawLink":"https://alight-creative.firebaseapp.com/__/auth/action?oobCode=XXXX&mode=signIn"
  }'
// Browser (fetch)
const res = await fetch("https://axzyedev.biz.id/api/v1/verify-account", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "AzaGanteng-xxxxxxxxxxxxxxxx"
  },
  body: JSON.stringify({
    email: "user@gmail.com",
    rawLink: "https://alight-creative.firebaseapp.com/__/auth/action?oobCode=XXXX"
  })
});

const data = await res.json();
console.log(data.idToken);  // simpan untuk apply-premium
// Node.js (axios)
import axios from "axios";

const { data } = await axios.post(
  "https://axzyedev.biz.id/api/v1/verify-account",
  {
    email: "user@gmail.com",
    rawLink: "https://alight-creative.firebaseapp.com/__/auth/action?oobCode=XXXX"
  },
  {
    headers: { "X-API-Key": "AzaGanteng-xxxxxxxxxxxxxxxx" }
  }
);

console.log(data);
<?php
$ch = curl_init("https://axzyedev.biz.id/api/v1/verify-account");

curl_setopt_array($ch, [
  CURLOPT_POST           => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER     => [
    "Content-Type: application/json",
    "X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxx"
  ],
  CURLOPT_POSTFIELDS     => json_encode([
    "email"   => "user@gmail.com",
    "rawLink" => "https://alight-creative.firebaseapp.com/__/auth/action?oobCode=XXXX"
  ])
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
# Python (requests)
import requests

res = requests.post(
    "https://axzyedev.biz.id/api/v1/verify-account",
    headers={"X-API-Key": "AzaGanteng-xxxxxxxxxxxxxxxx"},
    json={
        "email": "user@gmail.com",
        "rawLink": "https://alight-creative.firebaseapp.com/__/auth/action?oobCode=XXXX"
    }
)

print(res.json())
Response — Success
HTTP 200
{
  "success": true,
  "idToken": "eyJhbGciOiJSUzI1NiIs...",
  "refreshToken": "AMf-vBz...",
  "uid": "abc123xyz",
  "isNewUser": false,
  "profile": { "email": "user@gmail.com" }
}
POST /api/v1/apply-premium
Apply Premium
Aktifkan premium pada akun Alight Motion. Butuh idToken dari endpoint verify-account. Rate limit: 5 akun / 24 jam per user (admin unlimited).
Headers
X-API-Key string API key kamu — atau Authorization: Bearer
Body
idToken string Token dari response /verify-account
email string (opsional) untuk log usage
Contoh Request
# Apply premium ke akun target
curl -X POST "https://axzyedev.biz.id/api/v1/apply-premium" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxx" \
  -d '{
    "idToken":"eyJhbGciOiJSUzI1NiIs...",
    "email":"user@gmail.com"
  }'
// Browser (fetch) — gabungan dengan verify-account
const API_KEY = "AzaGanteng-xxxxxxxxxxxxxxxx";

async function premiuminAkun(email, rawLink) {
  // 1. Verify akun
  const v = await fetch("/api/v1/verify-account", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": API_KEY
    },
    body: JSON.stringify({ email, rawLink })
  }).then(r => r.json());

  if (!v.success) throw new Error(v.message);

  // 2. Apply premium
  const p = await fetch("/api/v1/apply-premium", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-Key": API_KEY
    },
    body: JSON.stringify({ idToken: v.idToken, email })
  }).then(r => r.json());

  return p;
}
// Node.js (axios) — flow lengkap
import axios from "axios";

const API = "https://axzyedev.biz.id/api/v1";
const KEY = "AzaGanteng-xxxxxxxxxxxxxxxx";
const hdr = { "X-API-Key": KEY };

const email   = "user@gmail.com";
const rawLink = "https://alight-creative.firebaseapp.com/...oobCode=XXXX";

const verify = (await axios.post(`${API}/verify-account`, { email, rawLink }, { headers: hdr })).data;
const apply  = (await axios.post(`${API}/apply-premium`, { idToken: verify.idToken, email }, { headers: hdr })).data;

console.log("Order ID:", apply.orderId);
console.log("Quota:", apply.quota);
<?php
// PHP — flow lengkap
$API = "https://axzyedev.biz.id/api/v1";
$KEY = "AzaGanteng-xxxxxxxxxxxxxxxx";

function apiPost($url, $body, $key) {
  $ch = curl_init($url);
  curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
      "Content-Type: application/json",
      "X-API-Key: $key"
    ],
    CURLOPT_POSTFIELDS     => json_encode($body)
  ]);
  $res = json_decode(curl_exec($ch), true);
  curl_close($ch);
  return $res;
}

$verify = apiPost("$API/verify-account", [
  "email"   => "user@gmail.com",
  "rawLink" => "https://alight-creative.firebaseapp.com/...oobCode=XXXX"
], $KEY);

$apply = apiPost("$API/apply-premium", [
  "idToken" => $verify["idToken"],
  "email"   => "user@gmail.com"
], $KEY);

print_r($apply);
# Python — flow lengkap
import requests

API = "https://axzyedev.biz.id/api/v1"
KEY = "AzaGanteng-xxxxxxxxxxxxxxxx"
HDR = {"X-API-Key": KEY}

email   = "user@gmail.com"
rawLink = "https://alight-creative.firebaseapp.com/...oobCode=XXXX"

verify = requests.post(
    f"{API}/verify-account",
    headers=HDR,
    json={"email": email, "rawLink": rawLink}
).json()

apply = requests.post(
    f"{API}/apply-premium",
    headers=HDR,
    json={"idToken": verify["idToken"], "email": email}
).json()

print(apply)
Response — Success
HTTP 200
{
  "success": true,
  "orderId": "neobuzz-a1b2c3d4e5f6",
  "data": { "result": "OK" },
  "quota": {
    "used": 2,
    "limit": 5,
    "remaining": 3
  }
}
Response — Rate Limit
HTTP 429
{
  "success": false,
  "message": "Rate limit tercapai. Max 5 akun per 24 jam. Sudah terpakai: 5/5.",
  "used": 5,
  "limit": 5
}
POST /api/v1/refresh-token
Refresh Token
Refresh Firebase ID token yang sudah expired. Pakai refreshToken yang didapat dari verify-account.
Body
refreshToken string Refresh token dari verify-account
Contoh Request
curl -X POST "https://axzyedev.biz.id/api/v1/refresh-token" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxx" \
  -d '{"refreshToken":"AMf-vBz..."}'
const res = await fetch("/api/v1/refresh-token", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "AzaGanteng-xxxxxxxxxxxxxxxx"
  },
  body: JSON.stringify({ refreshToken: "AMf-vBz..." })
}).then(r => r.json());

console.log(res.idToken);
<?php
$ch = curl_init("https://axzyedev.biz.id/api/v1/refresh-token");
curl_setopt_array($ch, [
  CURLOPT_POST           => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER     => [
    "Content-Type: application/json",
    "X-API-Key: AzaGanteng-xxxxxxxxxxxxxxxx"
  ],
  CURLOPT_POSTFIELDS     => json_encode(["refreshToken" => "AMf-vBz..."])
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests

res = requests.post(
    "https://axzyedev.biz.id/api/v1/refresh-token",
    headers={"X-API-Key": "AzaGanteng-xxxxxxxxxxxxxxxx"},
    json={"refreshToken": "AMf-vBz..."}
).json()

print(res["idToken"])
HTTP 200
{
  "success": true,
  "idToken": "eyJhbGciOiJSUzI1NiIs...",
  "refreshToken": "AMf-vBz...",
  "uid": "abc123xyz"
}
POST /api/v1/captcha
Captcha Verify
Verifikasi token reCAPTCHA v2/v3 ke server Google. Dipakai di halaman login & daftar. Tidak butuh API key (public endpoint).
Body
token string Token dari widget grecaptcha.getResponse()
Contoh Request
# Public endpoint — tanpa API key
curl -X POST "https://axzyedev.biz.id/api/v1/captcha" \
  -H "Content-Type: application/json" \
  -d '{"token":"03AGdBq26..."}'
// Browser — pakai token dari grecaptcha
const token = grecaptcha.getResponse();

const res = await fetch("/api/v1/captcha", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ token })
}).then(r => r.json());

console.log(res.success);
<?php
$ch = curl_init("https://axzyedev.biz.id/api/v1/captcha");
curl_setopt_array($ch, [
  CURLOPT_POST           => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER     => ["Content-Type: application/json"],
  CURLOPT_POSTFIELDS     => json_encode(["token" => "03AGdBq26..."])
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests

res = requests.post(
    "https://axzyedev.biz.id/api/v1/captcha",
    json={"token": "03AGdBq26..."}
).json()

print(res)
HTTP 200
{
  "success": true,
  "hostname": "axzyedev.biz.id",
  "challenge_ts": "2025-01-15T10:30:00Z",
  "score": null
}

06 Error Codes

Semua error mengembalikan JSON dengan format { success: false, message: "..." }.

Status Pesan Artinya
400 Email tidak valid Format email salah atau kosong
401 API Key tidak valid API key salah, tidak ada, atau dinonaktifkan
401 Sesi login tidak valid Bearer token expired atau invalid
401 Autentikasi wajib Tidak ada header X-API-Key / Authorization
405 Method not allowed Pakai POST, bukan GET/PUT/DELETE
429 Rate limit tercapai Sudah pakai 5 akun / 24 jam
500 Terjadi kesalahan di server Error internal — coba lagi nanti
502 Server Google tidak merespon Downstream error dari Alight Motion / Google

07 Alur Lengkap

Berikut alur lengkap untuk mempremium-in satu akun Alight Motion via API:

  1. Send magic link → user dapat email berisi link verifikasi
  2. User copy link dari email → kirim ke API kamu
  3. Verify account → dapat idToken + refreshToken
  4. Apply premium → akun Alight Motion jadi premium ✅

Berikut contoh implementasi end-to-end di Node.js:

// Auto-premium lengkap dengan Node.js
import axios from "axios";

const API = "https://axzyedev.biz.id/api/v1";
const KEY = "AzaGanteng-xxxxxxxxxxxxxxxx";
const hdr = { "X-API-Key": KEY };

async function premiuminAkun(email, rawLink) {
  // 1. Kirim magic link
  await axios.post(`${API}/send-magic-link`, { email }, { headers: hdr });
  console.log("✓ Magic link terkirim");

  // 2. Verify akun dengan link yang sudah didapat user
  const v = (await axios.post(`${API}/verify-account`,
    { email, rawLink }, { headers: hdr })).data;

  if (!v.success) throw new Error(v.message);
  console.log("✓ Akun terverifikasi. UID:", v.uid);

  // 3. Apply premium
  const p = (await axios.post(`${API}/apply-premium`,
    { idToken: v.idToken, email }, { headers: hdr })).data;

  if (!p.success) throw new Error(p.message);
  console.log("✓ Premium aktif! Order ID:", p.orderId);
  console.log("  Sisa kuota:", p.quota.remaining, "/", p.quota.limit);

  return p;
}

// Usage
await premiuminAkun("target@gmail.com", "https://alight-creative.firebaseapp.com/...oobCode=XXX");
<?php
// Auto-premium lengkap dengan PHP
$API = "https://axzyedev.biz.id/api/v1";
$KEY = "AzaGanteng-xxxxxxxxxxxxxxxx";

function apiPost($url, $body, $key) {
  $ch = curl_init($url);
  curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
      "Content-Type: application/json",
      "X-API-Key: $key"
    ],
    CURLOPT_POSTFIELDS     => json_encode($body)
  ]);
  $res = json_decode(curl_exec($ch), true);
  curl_close($ch);
  return $res;
}

function premiuminAkun($email, $rawLink, $API, $KEY) {
  // 1. Kirim magic link
  apiPost("$API/send-magic-link", ["email" => $email], $KEY);

  // 2. Verify akun
  $v = apiPost("$API/verify-account", [
    "email"   => $email,
    "rawLink" => $rawLink
  ], $KEY);

  if (!($v["success"] ?? false)) throw new Exception($v["message"]);

  // 3. Apply premium
  $p = apiPost("$API/apply-premium", [
    "idToken" => $v["idToken"],
    "email"   => $email
  ], $KEY);

  return $p;
}

$result = premiuminAkun("target@gmail.com",
  "https://alight-creative.firebaseapp.com/...oobCode=XXX", $API, $KEY);

print_r($result);
# Auto-premium lengkap dengan Python
import requests

API = "https://axzyedev.biz.id/api/v1"
KEY = "AzaGanteng-xxxxxxxxxxxxxxxx"
HDR = {"X-API-Key": KEY}

def premiumin_akun(email, raw_link):
    # 1. Kirim magic link
    requests.post(f"{API}/send-magic-link", headers=HDR,
                 json={"email": email})

    # 2. Verify akun
    v = requests.post(f"{API}/verify-account", headers=HDR,
        json={"email": email, "rawLink": raw_link}).json()

    if not v.get("success"):
        raise Exception(v.get("message"))

    # 3. Apply premium
    p = requests.post(f"{API}/apply-premium", headers=HDR,
        json={"idToken": v["idToken"], "email": email}).json()

    print(f"Order ID: {p['orderId']}")
    print(f"Sisa kuota: {p['quota']['remaining']}/{p['quota']['limit']}")
    return p

premiumin_akun("target@gmail.com",
    "https://alight-creative.firebaseapp.com/...oobCode=XXX")
Selesai! Akun Alight Motion sudah premium. Buka aplikasinya untuk verify.