TGPVA API — Simple & Token‑based

Use these endpoints to check balance, list available countries, buy a number, fetch the verification code, and logout. All requests are GET with your API key as a query parameter (apiKey).

Domain: tgpva.com Auth: apiKey=YOUR_API_KEY Method: GET
GET Get Balance /api/user?apiKey=APIKEY&action=getBalance

Get Balance

Returns your current account balance.

Successful response
{
  "ok": true,
  "balance": "12.50",
  "currency": "USD"
}
Error response
{
  "ok": false,
  "error": "Invalid API key"
}
GET Get Countries /api/user?apiKey=APIKEY&action=getCountries

Get Countries

Returns a list of available country codes (2‑letter ISO).

Successful response
{
  "ok": true,
  "countries": ["US", "AE", "DE", "..."]
}
Error response
{
  "ok": false,
  "error": "please_try_again"
}
GET Buy Number /api/user?apiKey=APIKEY&action=getNumber&country=COUNTRY

Buy Number

Purchases a number for the requested country. COUNTRY is a 2‑letter ISO code (e.g., US).

Successful response
{"ok":true,"msg":"success","result":{"phone":"+123456789","hash":"35d2c16ee247","price":"0.55"}}
Error response
{
  "ok": false,
  "error": "no_available_numbers"
}
GET Get Code /api/user?apiKey=APIKEY&action=getCode&number=NUMBER

Get Code

Fetches the one‑time login code for the purchased number.

Successful response
{"ok":true,"msg":"success","result":{"status":"Received","number":"+123456789","code":"12345","password":"shdgbdy23","output":"done"}}
Error response
{
  "ok": false,
  "error": "WAITING"
}
GET Logout /api/user?apiKey=APIKEY&action=logout&number=NUMBER

Logout

Releases the number from your session.

Successful response
{"ok":true,"msg":"success","result":{"status":"Logged out successfully"}}
Error response
{
  "ok": false,
  "error": "no_available_numbers"
}

Errors & Best Practices

Common error codes

  • INVALID_API_KEY — API key is invalid or missing.
  • MISSING_PARAM — A required query parameter is missing.
  • NO_NUMBERS — No numbers currently available.
  • WAITING — Code not received yet; retry later.
  • NUMBER_NOT_FOUND — Number not active for this key.
  • SERVICE_TEMPORARILY_UNAVAILABLE — Please retry later.

Best practices

  • Always use HTTPS and keep your apiKey private.
  • For WAITING, poll every 5–10s with a reasonable timeout.
  • Handle OUT_OF_STOCK by offering alternative countries.
🏠 Home ✈️ Contact 🤖 Open TGPVA Bot