Join Community Join Channel Contact Owner
๐Ÿ‘‘ KLS Menu
๐Ÿ  Home ๐Ÿ›’ Marketplace ๐Ÿ”ง Tools ๐ŸŽฎ Games ๐Ÿ“ฑ Buy Numbers ๐ŸŽ Giveaways ๐Ÿ‘ฅ Groups โœ‰๏ธ Direct Messages ๐Ÿ†˜ Support
Login Get Started
๐Ÿ”‘ Developers

KLS API Documentation

Connect your own scripts and apps to your KLS account

Getting Started

Every KLS user can generate a personal API Key and API Secret from Settings โ†’ API Access. These two values authenticate every request you make to the API โ€” treat them like a password. Your secret is shown once at generation time and never again, so save it somewhere safe immediately.

All endpoints are scoped to your own account only โ€” you can check your own balance, list available items, view your own purchase history, and buy items on your own behalf. You cannot access any other user's data.

Authentication

Every request must include these two headers:

X-API-Key: your_api_key X-API-Secret: your_api_secret

Requests missing either header, or with an invalid/revoked key, get a 401 Unauthorized response.

Base URL

https://your-site.example.com/api/v1

Endpoints

MethodEndpointWhat it does
GET/meYour account info (name, email, balance, Game ID)
GET/balanceYour current wallet balance
GET/purchasesYour full purchase history
GET/listingsAll available logs/tools (add ?type=tool or ?type=log to filter)
GET/listings/:idDetails of one specific listing
POST/buy/:idPurchase a listing using your wallet balance
GET/numbers/optionsProviders/countries currently available to rent a number for, with price
POST/buy-numberRent a number โ€” body: provider, country
GET/get-smsPoll for the OTP โ€” query: order_id
POST/cancel-numberCancel before a code arrives and get refunded โ€” body: order_id

Example: Check your balance

curl https://your-site.example.com/api/v1/balance \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret"

Example: List available items

curl "https://your-site.example.com/api/v1/listings?type=tool" \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret"

Example: Buy an item

๐Ÿ’ณ No platform fee โ€” you're charged exactly the item's listed price via the API, same as buying it through the marketplace. The response includes itemPrice and totalCharged (always equal) so you can confirm this.
curl -X POST https://your-site.example.com/api/v1/buy/LISTING_ID_HERE \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret"

Example: Buy a Number

๐Ÿ“ฑ Numbers are used to receive a one-time verification code from the provider you choose (WhatsApp, Telegram, etc). Prices here are separate from the site's own Buy Numbers page โ€” check /numbers/options for what's currently available and its price. Want to see this exact flow (browse โ†’ buy โ†’ poll โ†’ done) built into a full page? /buy-number on this site is that reference implementation โ€” same four calls below, wired to a UI.
# 1. See what's available curl https://your-site.example.com/api/v1/numbers/options \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret" # 2. Rent a number curl -X POST https://your-site.example.com/api/v1/buy-number \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret" \ -H "Content-Type: application/json" \ -d '{"provider":"WhatsApp","country":"United States"}' # 3. Poll for the code (repeat every few seconds until status is "received") curl "https://your-site.example.com/api/v1/get-sms?order_id=ORDER_ID_HERE" \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret" # 4. If no code arrives, cancel for a refund curl -X POST https://your-site.example.com/api/v1/cancel-number \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret" \ -H "Content-Type: application/json" \ -d '{"order_id":"ORDER_ID_HERE"}'

Errors

StatusMeaningWhat to do
401Missing or invalid API key/secretDouble-check the X-API-Key/X-API-Secret headers are set and match exactly what's shown in Settings โ†’ API Access. Regenerating your key there invalidates the old one immediately.
403Account restrictedYour account has been limited โ€” contact support, this isn't something a retry fixes.
404Listing not found or no longer availableRe-fetch /listings or /numbers/options โ€” the item may have sold out or been removed since you last checked.
400Insufficient balance, sold out, or invalid requestCheck the response body's error field for the specific reason โ€” it's always a plain-English message, not just the code.
402Insufficient balance (numbers endpoints)Deposit funds before retrying โ€” no partial/temporary state is created, so it's safe to just retry once the balance is topped up.
409No numbers currently available for that provider/countryThis is temporary stock, not a config issue โ€” wait a few seconds and retry, or check /numbers/options again in case that provider/country is no longer listed at all.
๐Ÿ“ฑ Numbers specifically: your money is only ever taken if a real number was actually issued โ€” a failed /buy-number call never touches your balance, so it's always safe to just retry. Once you do have an order, it auto-refunds on its own if no code arrives in time โ€” you don't have to call /cancel-number unless you want your balance back sooner than that.
โ† Back to Settings