Use these endpoints to check balance, list countries, buy a number, fetch the verification code, and logout. All requests are GET with your API key as a query parameter (apiKey).
https://tgpva.com/api/user
Always use HTTPS and keep your apiKey private.
Tap any endpoint to expand the details (mobile-friendly).
Returns your current account balance.
{
"ok": true,
"balance": "12.50",
"currency": "USD"
}
{
"ok": false,
"error": "INVALID_API_KEY"
}
Returns a list of available country codes (2-letter ISO).
{
"ok": true,
"countries": ["US", "AE", "DE", "..."]
}
{
"ok": false,
"error": "please_try_again"
}
Purchases a number for the requested country. COUNTRY is a 2-letter ISO code (e.g., US).
{"ok":true,"msg":"success","result":{"phone":"+123456789","hash":"35d2c16ee247","price":"0.55"}}
{
"ok": false,
"error": "no_available_numbers"
}
Fetches the one-time login code for the purchased number.
{"ok":true,"msg":"success","result":{"status":"Received","number":"+123456789","code":"12345","password":"shdgbdy23","output":"done"}}
{
"ok": false,
"error": "WAITING"
}
Releases the number from your session.
{"ok":true,"msg":"success","result":{"status":"Logged out successfully"}}
{
"ok": false,
"error": "NUMBER_NOT_FOUND"
}
Common error codes and tips for stable integration.