API Documentation

Customer API for this Telegram bot. Get your key from the API KEY section in the bot.

Getting started

All requests are GET to:

https://spider-tg.com/api.php?token=YOUR_KEY&action=ACTION

Authentication

Pass token in the query string. Missing token returns 400. Invalid token returns 401. Banned accounts return 403.

get_balance GET

Returns your wallet balance.

https://spider-tg.com/api.php?token=KEY&action=get_balance
{
  "success": true,
  "balance": 12.5
}

get_countries GET

Available countries. Keys are English names, values are country codes.

https://spider-tg.com/api.php?token=KEY&action=get_countries
{
  "success": true,
  "countries": {
    "Bangladesh": {
      "name": "BD",
      "quantity": 100
    },
  }
}

get_prices GET

Number prices after the bot profit rate.

https://spider-tg.com/api.php?token=KEY&action=get_prices
{
  "success": true,
  "prices": {
    "BD": 0.35
  }
}

buy_number GET

Buy a number. Required: country (ISO-2, e.g. BD).

https://spider-tg.com/api.php?token=KEY&action=buy_number&country=BD
{
  "success": true,
  "number": "+8801xxxxxxx",
  "hash_code": "orderId|itemId",
  "price": 0.35,
  "remaining_points": 12.15
}

Save hash_code to fetch the SMS code later. The purchase is stored in bot stats and sent to notification channels.

get_code GET

Get the activation code. Required: hash_code from buy_number.

https://spider-tg.com/api.php?token=KEY&action=get_code&hash_code=ORDER|ITEM
{
  "success": true,
  "code": "12345",
  "password": "xxxx"
}

resend_code GET

Request a new code for the same number.

https://spider-tg.com/api.php?token=KEY&action=resend_code&hash_code=ORDER|ITEM

buy_session GET

Buy sessions. Required: country and quantity.

https://spider-tg.com/api.php?token=KEY&action=buy_session&country=US&quantity=1
{
  "success": true,
  "order_id": "xxxx",
  "status": "processing",
  "completed": 1.2,
  "progress": 0,
  "price": 1.2,
  "remaining_points": 10.3
}

session_status GET

Check a session order. When status is done, file_url is a zip on this server.

https://spider-tg.com/api.php?token=KEY&action=session_status&order_id=xxxx
{
  "success": true,
  "status": "done",
  "progress": 100,
  "completed": 1,
  "total": 1,
  "file_url": "https://example.com/downloads/....zip"
}

Errors

  • 400 Token is required / Invalid action / Country is required
  • 401 Invalid token
  • 402 Insufficient points
  • 403 Account is banned
  • 404 Code is not available
  • 502 Provider purchase failed
{
  "error": "Invalid token"
}

Try it

Response will appear here