Discord Verification With a Real-SIM API for AI Agents (2026)

4.7 Updated 21 June 2026 Published 21 June 2026
Glass SMS notification chip with the Discord icon and a verification code on a waves purple background

TL;DR — Discord runs a carrier-prefix check the instant an agent submits a number. VoIP ranges (Twilio, Bandwidth, Plivo, Vonage, and the cheap SMS aggregators) are dropped before the SMS leaves the queue — so the agent polls forever for a code that was never sent, then burns budget retrying the same dead pool. The fix is a backend that hands out real carrier-issued SIM numbers. VirtualSMS exposes it two ways for agents: a one-command MCP server (18 tools) and a three-endpoint REST API (buy, poll, cancel). Real SIMs across 145+ countries and 2500+ services, consistently high first-attempt Discord delivery, from $0.05/code, auto-refund on no-SMS. Discovery endpoints are unauthenticated.


An AI agent tasked with spinning up a Discord moderation account buys a number from a “cheap SMS API,” submits it to Discord, and waits. The HTTP response was clean — number purchased, no error. Discord’s form said “we’ve sent you a code.” But no SMS ever arrives, the timeout fires, and the agent retries with another number from the same VoIP pool. Same wall. Same wasted credit. That is not a bug in your agent. It is exactly how Discord’s signup gate is designed to work — and the fix lives upstream, in the number your agent buys.

Discord verification with a real-SIM API works because Discord’s carrier-prefix check reads a real carrier SIM as a legitimate mobile number, while it silently drops every VoIP range before the SMS is even queued. This guide shows how to wire that real-SIM path into any AI agent — via a one-command MCP server or three REST calls — in under 10 minutes.

Key Takeaways

  • Discord runs a deterministic carrier-prefix check at signup; known VoIP ranges are dropped before the SMS leaves the queue, so your agent polls for a code that was never sent.
  • The failure is silent to an agent: purchase succeeds, form says “code sent,” nothing arrives, and the loop burns budget retrying the same dead pool.
  • Real carrier-issued SIM numbers pass the prefix check because they look identical to a personal phone at the carrier level.
  • Two integration surfaces, one backend: a one-command MCP server (18 tools, native to Claude/Cursor/Cline) and a three-endpoint REST API (LangChain / OpenAI / CrewAI / custom).
  • Consistently high first-attempt Discord delivery from $0.05/code, auto-refund on no-SMS, and unauthenticated discovery endpoints so the agent can plan before it spends.

Why Does Discord Reject VoIP Numbers — And Why Does My Agent Stall?

Discord runs a carrier-prefix lookup at the exact moment a number is submitted, and if the prefix belongs to a known VoIP range — Twilio, Bandwidth, Plivo, Vonage, or the aggregators that surface first when you search “cheap SMS API” — the verification request is dropped before it leaves the platform’s queue. The number was purchased, the form confirmed a code was sent, and yet the SMS was never dispatched.

That failure mode is uniquely bad for autonomous agents. Every signal an agent can observe looks healthy: the verification provider returns a valid number with no error, and Discord’s UI reports a code in flight. The agent has no way to see the drop, so it polls for an SMS that does not exist, hits its timeout, and retries with the next number from the same VoIP pool — into the same wall. Across a multi-account pipeline, that is an agent that burns budget infinitely on dead activations while reporting no visible error.

The mechanism is the same one that blocks throwaway VoIP on WhatsApp, Telegram, Tinder, and most major consumer platforms; the deeper walk-through lives in the VoIP vs physical SIM deep-dive. The carrier-prefix check is simply the cheapest way Discord enforces its zero-appetite policy for disposable VoIP signups. The fix is upstream of your agent logic: point the verification step at a backend that delivers numbers from real mobile carriers, not VoIP aggregators.

Citation Capsule — Discord performs a carrier-prefix classification at signup and drops SMS verification requests for numbers in known VoIP ranges (Twilio, Bandwidth, Plivo, Vonage, and similar aggregators) before the OTP is dispatched. For an autonomous agent, the drop is invisible — the number purchase succeeds and Discord’s form reports a sent code — so the agent polls indefinitely and retries from the same VoIP pool, consuming budget without a visible error. Real carrier-issued SIM numbers pass because their prefixes are indistinguishable from a personal mobile at the carrier level. The corrective action is at the verification backend, not the agent orchestration: swap the VoIP source for a real-SIM API.

Why virtual numbers get rejected — and the fix →

How Does a Real-SIM API Fix Discord Verification for Agents?

A real-SIM API fixes it by handing the agent a number that sits in a real mobile carrier’s prefix range instead of a VoIP aggregator’s — so the SMS actually arrives, while the integration shape stays identical to any other verification API: buy a number, wait for the SMS, get the code.

VirtualSMS supplies real carrier-issued SIM numbers across 145+ countries and 2500+ services — Discord, WhatsApp, Telegram, Tinder, Google, X, Bumble, Snapchat, and the long tail. From the agent’s perspective nothing about the call flow changes; only the delivery outcome does, because the underlying number is a real mobile line rather than an internet-routed VoIP account.

Two surfaces expose the same backend, both built for autonomous agents:

  • MCP server — install once with one command and the agent gains 18 SMS-verification tools natively. Best for Claude Desktop, Claude Code, or any MCP-compatible runtime. See the Claude MCP setup guide.
  • REST API — three endpoints (buy, poll, cancel) with Bearer-token auth. Best for LangChain, OpenAI Assistants, CrewAI, or any orchestration outside the MCP ecosystem.

Discovery endpoints are unauthenticated. Listing services and countries, checking a price, and finding the cheapest option require no API key and consume no budget — so the agent can plan country and service combinations before it commits spend. If you are weighing which surface to build against, the MCP vs API comparison breaks down the tradeoffs.


How Do I Install the VirtualSMS MCP Server (Claude / MCP Runtimes)?

If your agent runs inside Claude Desktop, Claude Code, or any MCP-compatible client (Cursor, Continue, Cline, and similar), the integration is a single command:

claude mcp add --scope user virtualsms \
  -- npx -y virtualsms-mcp \
  -e VIRTUALSMS_API_KEY=vsms_your_api_key_here

Restart the agent runtime and the VirtualSMS tools light up. The agent can then act on a plain-language prompt:

Buy the cheapest Discord activation number from the UK,
wait up to 5 minutes for the verification SMS, and return the
six-digit code. If the SMS doesn't arrive, swap the number once
before giving up.

Behind the scenes the model calls buy_number(service="discord", country="uk"), wait_for_code(order_id=…), and swap_number(order_id=…) as needed — no wrapper code required. The full 18-tool catalog and three production workflow patterns are covered in the Claude + VirtualSMS MCP workflow guide.

The MCP server also runs as a hosted endpoint for zero-install adoption: pass your key in the x-api-key header and you are live. Pick stdio for local-first sandboxes, hosted HTTP for serverless agent runtimes.


How Do I Wire Discord Verification With Three REST Calls?

For agents outside the MCP ecosystem, the REST integration is three endpoints with Bearer-token auth in the Authorization header — no KYC, no platform fee, no minimum spend.

1. Discover the cheapest country (optional, unauthenticated):

curl https://api.virtualsms.io/v1/services/discord/cheapest

2. Buy a real-SIM number for Discord:

curl -X POST https://api.virtualsms.io/v1/orders \
  -H "Authorization: Bearer $VIRTUALSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"service": "discord", "country": "uk"}'

# Response:
# { "id": "ord_8FQ...", "phone": "+447700900123", "price": 0.05, "status": "waiting" }

3. Poll for the SMS code:

curl -H "Authorization: Bearer $VIRTUALSMS_API_KEY" \
  https://api.virtualsms.io/v1/orders/ord_8FQ...

# Response when the SMS lands:
# { "id": "ord_8FQ...", "phone": "+447700900123",
#   "code": "374912", "sms": "Your Discord code is 374912.",
#   "status": "completed" }

4. Cancel on timeout (auto-refunds):

curl -X POST -H "Authorization: Bearer $VIRTUALSMS_API_KEY" \
  https://api.virtualsms.io/v1/orders/ord_8FQ.../cancel

The cancel call is the safety net: failed activations auto-refund, so the agent loop never consumes budget on a number that never received an SMS. For five-figure-per-month throughput, swap the polling loop for the WebSocket-backed wait_for_code endpoint — same wrapper shape, no wasted HTTP. The pattern works for any of the 2500+ supported services.


What Does the Reference Agent Integration Look Like?

The full integration is about 25 lines of Python. It works as a LangChain @tool body, an OpenAI Assistants function handler, or a Claude tool-use dispatcher — wrap it however your framework expects:

import os, time, requests

API = "https://api.virtualsms.io/v1"
KEY = os.environ["VIRTUALSMS_API_KEY"]
H   = {"Authorization": f"Bearer {KEY}"}

def verify_discord(country: str = "uk", timeout_s: int = 300) -> dict:
    """Buy a real-SIM number for Discord, wait for the SMS code, return it.
    Auto-cancels (and auto-refunds) on timeout."""
    order = requests.post(
        f"{API}/orders", headers=H,
        json={"service": "discord", "country": country},
    ).json()
    oid, phone = order["id"], order["phone"]

    deadline = time.time() + timeout_s
    while time.time() < deadline:
        sms = requests.get(f"{API}/orders/{oid}", headers=H).json()
        if sms.get("code"):
            return {"phone": phone, "code": sms["code"]}
        time.sleep(3)

    requests.post(f"{API}/orders/{oid}/cancel", headers=H)
    return {"error": "timeout — order auto-cancelled and refunded",
            "phone": phone}

if __name__ == "__main__":
    print(verify_discord("uk"))

Drop this into your agent and it can sign up for Discord on demand. For the full multi-framework wrappers — LangChain decorator, OpenAI JSON schema, CrewAI agent role, Claude tool-use — see the AI agent phone verification guide. For the strategic context on why agents need this primitive at all, read why AI agents need real phone numbers.


VoIP API vs Real-SIM API for Discord — Which Actually Delivers?

The economics flip the moment you count failed activations, not per-message list price. A VoIP API that is “cheaper” per message but rejected at Discord’s prefix check costs infinity per successful verification. A real-SIM API at $0.05/code with consistently high delivery and auto-refund on the misses costs roughly $0.05 per successful verification. The decision is structural, not price-shopping.

BackendDiscord deliveryPrice floorRefund on fail
Generic VoIP API (Twilio / Bandwidth / aggregators)Rejected at carrier-prefix checkPer-month + per-messageManual support ticket
Free public receive-SMS sitesRange-blocked by DiscordFree (in theory)n/a — no payment
Pool-rotated bulk SIMsRange-flagged after first abuse signalVariableProvider-dependent
VirtualSMS real-SIM APIConsistently high delivery on first attemptFrom $0.05/codeAuto-refund on no-SMS

Citation Capsule — For AI agents automating Discord signup, real-SIM verification APIs deliver where VoIP APIs are structurally blocked. Discord’s carrier-prefix check rejects VoIP ranges (Twilio, Bandwidth, Plivo, Vonage) and range-blocks free public receive-SMS pools, producing zero successful verifications regardless of per-message price. A real-SIM API achieves consistently high first-attempt delivery from $0.05 per code with automatic refunds on the failures, yielding an effective cost near $0.05 per successful verification. Cost-per-successful-verification, not per-message list price, is the correct metric for an agent pipeline, because failed VoIP activations still consume time, retries, and — on some providers — non-refundable spend.


Pricing and Rate Limits — Built for Agent Throughput

  • Verifications from $0.05 per SMS code. The exact price per service and country is visible on the live pricing page and via the API.
  • Auto-refund on no-SMS. Failed activations cost zero, so the agent loop can retry without cost paranoia.
  • 120 requests/min per API key by default. Production accounts can be lifted higher — email support with expected throughput.
  • Multi-chain crypto deposits. Top up via USDC on Base, Tron, Polygon, Arbitrum, Solana, or BNB Chain. Deposit fees are cents, no monthly minimum, and unused balance never expires.
  • Discovery endpoints are free. The agent plans before it commits spend.

For a deposit-first, pay-per-call model where the agent settles its own balance over HTTP, the x402 pattern is a natural fit for autonomous budgets.


Troubleshooting — When the SMS Does Not Arrive

Order completes but no code after 5 minutes. Cancel the order (auto-refund), then call the list-countries endpoint and pick a different country with live stock. Default to a high-trust carrier range and fall back to mid-tier countries only when stock runs thin.

Discord rejects “invalid phone number.” This is a country mismatch — the agent picked a country whose mobile prefix Discord soft-blocks for new accounts. Swap to a high-trust range and retry; the find_cheapest discovery endpoint already filters by service compatibility.

The agent loops on the same failure. Almost always the agent is still wired to a VoIP backend rather than the real-SIM API — confirm the verification provider and double-check the base URL has not been swapped back to a VoIP source.

Pre-launch checklist: hit the balance endpoint (auth wired), call the services endpoint (server reachable), then run a single low-cost order to validate end-to-end before turning the agent loose on production traffic.


The Bottom Line

Discord verification breaks for AI agents for one structural reason: Discord checks the carrier prefix before it sends an OTP, and VoIP ranges are dropped silently — so the agent burns budget polling for a code that was never sent. The fix is not more retries or a better timeout; it is a real-SIM verification backend whose numbers read as legitimate mobile lines at the prefix level.

VirtualSMS exposes that backend two ways — a one-command MCP server with 18 native tools, and a three-endpoint REST API for every other framework — across 145+ countries and 2500+ services, from $0.05/code, at consistently high first-attempt Discord delivery with auto-refund on the misses. Discovery endpoints are unauthenticated, so the agent plans before it spends. Wire it in once and your agent signs up for Discord on demand.

Start with a specific target on the buy a UK Discord number walkthrough, browse the full verifications catalog, compare multi-day options on rentals, or read the live pricing.


Frequently Asked Questions

Why does Discord reject so many virtual numbers?

Discord runs a carrier-prefix lookup the moment you submit a number. If the prefix belongs to a known VoIP range — Twilio, Bandwidth, Plivo, Vonage, or the long tail of cheap SMS aggregators — the verification SMS is dropped before it ever leaves the queue. You do not see a failed delivery; you see nothing arrive. Public free-receive-SMS sites fail the same way because Discord crawls and range-blocks those shared number pools. A real carrier-issued SIM number looks identical to a personal phone at the prefix level, which is why a real-SIM API is the path that actually completes Discord verification.

How do I add Discord verification to my AI agent?

Two ways, both ship in minutes. Install the VirtualSMS MCP server with one command and the agent gains 18 SMS-verification tools natively — your prompt becomes “buy a Discord number, wait for the SMS, return the code” with no wrapper code. Or wrap three REST endpoints (POST /orders, GET /orders/{id}, POST /orders/{id}/cancel) in a single function and register it as a LangChain @tool, an OpenAI Assistants function, or a Claude tool-use schema. Either path is roughly 5–30 lines of code.

What is the cheapest country for Discord SMS verification?

Verifications start from $0.05 per SMS code. The exact cheapest country fluctuates with live stock, so read it programmatically before committing spend — the cheapest-lookup and price-check endpoints are unauthenticated and cost nothing. High-trust mobile-carrier ranges tend to clear Discord on the first attempt and rarely trigger the “invalid phone number” soft-block that a few mid-tier ranges hit. When one country runs low on stock, the discovery endpoints let the agent pick another before it spends a credit.

Does VirtualSMS work for bulk Discord account creation?

Yes. The API defaults to 120 requests per minute per key, and production accounts can be lifted higher on request. For agent-driven bulk pipelines the right pattern is fan-out: queue N orders in parallel, await each via the wait-for-code WebSocket, and cancel any that time out. Each activation is independent and auto-refunds on no-SMS, so the loop runs without cost paranoia. Note that each Discord account still needs its own fresh number plus a fresh browser fingerprint and clean IP — reusing any one of those trips Discord’s cluster-flag heuristics.

What happens if Discord does not send the SMS?

The agent calls the cancel endpoint and the activation auto-refunds — you are never charged for a code that did not arrive. The reference script on this page bounds the wait to five minutes, which covers the large majority of legitimate Discord deliveries. If cancel-and-retry keeps firing on the same country, that country’s stock or trust has dipped — call the list-countries endpoint and switch, rather than retrying the same combination.

Can I use the same number for multiple Discord accounts?

No. Each Discord account needs its own fresh number to avoid the cluster-flag heuristics Discord applies at signup. The number is only one of three signals — a fresh browser fingerprint and a clean residential IP per account are the other two. Reusing any single one of those three across accounts is what trips the heuristic. For multi-account operations, treat each (number, fingerprint, IP) as a single-use bundle.

MCP server or REST API — which should my agent use?

Use the MCP server if your agent runs inside Claude Desktop, Claude Code, Cursor, Continue, Cline, or any MCP-compatible runtime — it is a one-command install and exposes 18 tools the model calls natively, no wrapper code. Use the REST API for LangChain, OpenAI Assistants, CrewAI, or any custom orchestration outside the MCP ecosystem — three endpoints, Bearer-token auth. Both surfaces hit the same real-SIM backend, so delivery and pricing are identical; pick by where your agent runs.

James Foster avatar

Written by

Developer Relations & API

4.7

James focuses on SMS API integration, developer tooling, and automation workflows for engineering teams. He covers virtual number use cases in QA testing, CRM integration, multi-account management, and the emerging MCP ecosystem for AI-driven communication workflows.

from $0.05
Get verified