All client requests must include an API key in the request headers. User-facing endpoints on your mini-app should pass this key from your backend โ never expose it in client-side code.
Header
Scope
Description
X-API-Key
Client application
Issued to your client account. Attach to every request your backend makes to the API.
โ ๏ธ Security Notice
Keep your API key on the server side only. Never embed it in your mini-app frontend, mobile app, or public repository.
Workflow Overview
End-to-end flow for submitting and processing an account:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLIENT (your backend / mini-app) โ
โ 1. POST /user/register โ register your end-user โ
โ 2. GET /pricing/view โ show prices to user โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ USER (end-user submitting an account) โ
โ 3. POST /auth/request-otp โ receive OTP on phone โ
โ 4. POST /auth/verify-otp โ submit OTP โ
โ 5. POST /auth/verify-2fa โ (if required) password โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STATUS TRACKING โ
โ 6. GET /account/status โ poll by phone โ
โ 7. GET /user/balance โ check credited balance โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WEBHOOK (optional) โ
โ POST your callback URL on account completion โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Client Integration For Developers
Endpoints your backend calls to manage users and pricing.
POST/user/registerโบ
Register a new end-user under your client account. Returns a personal identifier and starting balance.
โ Save the returned api_key. You can use it as user_identifier in subsequent requests to track this specific user's activity.
GET/pricing/viewโบ
Retrieve current pricing for your endpoint, optionally filtered by country.
Query Parameters
Name
Type
Required
Description
endpoint_name
string
required
Your endpoint identifier
countries
string
optional
Comma-separated: ISO code (BD), name (Bangladesh), or partial match
Examples
# All countries
curl -H "X-API-Key: YOUR_API_KEY" \
"https://tg-server-t88w.onrender.com/pricing/view?endpoint_name=default"
# Specific countries
curl -H "X-API-Key: YOUR_API_KEY" \
"https://tg-server-t88w.onrender.com/pricing/view?endpoint_name=default&countries=BD,IN,US"
How it works: When your client balance is low, initiate a top-up via the Heleket payment link provided in your dashboard. Payments are credited automatically after network confirmation.
Status Codes
Code
Meaning
200
Success
400
Bad request โ validation error, duplicate phone, expired OTP
401
Unauthorized โ invalid or missing API key
403
Forbidden โ resource not accessible to this user