[{"data":1,"prerenderedAt":81},["ShallowReactive",2],{"content:en:blog\u002Fsms-pumping-fraud":3},{"path":4,"locale":5,"section":6,"title":7,"description":8,"html":9,"headings":10,"faq":58,"updated":77,"order":78,"words":79,"meta":80},"blog\u002Fsms-pumping-fraud","en","blog","SMS pumping fraud: how it works and how to stop paying for fake codes","How SMS pumping, or artificial inflation of traffic, turns your verification form into a revenue source for attackers, and the checks that make it unprofitable.","\u003Cp>SMS pumping is a fraud in which attackers use your forms to send text messages to numbers they profit from, and you pay for every one. The industry body GSMA describes the practice as artificial inflation of traffic (AIT). It is not an attack on your users. It is an attack on your messaging bill, and it works because a verification form is, by design, an unauthenticated way to make you send an SMS.\u003C\u002Fp>\n\u003Ch2 id=\"how-the-scheme-works\">\u003Ca class=\"heading-link\" href=\"#how-the-scheme-works\">\u003Cspan>How the scheme works\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The scheme needs one fact about how messaging is paid for: sending a message costs you money, and money moves down the chain to the network that delivers it.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>The attacker finds a form that sends a code.\u003C\u002Fstrong> Signup, login, password reset and &quot;text me the app link&quot; all qualify. Anything reachable without an account is best.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A script submits numbers on a chosen route.\u003C\u002Fstrong> The numbers belong to a destination where terminating a message pays well, or to numbers an accomplice controls.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Your platform sends the codes.\u003C\u002Fstrong> It does not know the numbers are not users. Each message is billed to you by your messaging provider.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The terminating side earns from the traffic\u003C\u002Fstrong>, and a share goes back to whoever arranged it. This revenue-sharing step is what makes the fraud profitable.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Nobody ever types the code.\u003C\u002Fstrong> The attempt expires, and the script moves to the next number.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The victim pays for volume that never helped a customer. The mechanism does not need any breach of your system. It needs a form that sends too easily.\u003C\u002Fp>\n\u003Ch2 id=\"what-it-looks-like-in-your-data\">\u003Ca class=\"heading-link\" href=\"#what-it-looks-like-in-your-data\">\u003Cspan>What it looks like in your data\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>You cannot see the revenue share, but you can see the shape of the traffic.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Signal\u003C\u002Fth>\n\u003Cth>What it looks like\u003C\u002Fth>\n\u003Cth>Why it points to pumping\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Destination mix\u003C\u002Ftd>\n\u003Ctd>A spike in sends to countries where you have no users\u003C\u002Ftd>\n\u003Ctd>Real signups follow your customers\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Number patterns\u003C\u002Ftd>\n\u003Ctd>Many numbers in one prefix, or in sequence\u003C\u002Ftd>\n\u003Ctd>People do not sign up in numeric order\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Conversion\u003C\u002Ftd>\n\u003Ctd>Codes sent keep rising while codes entered do not\u003C\u002Ftd>\n\u003Ctd>Bots never read the message\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Timing\u003C\u002Ftd>\n\u003Ctd>Bursts at regular intervals, often at night\u003C\u002Ftd>\n\u003Ctd>Scripts run on a schedule\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Source\u003C\u002Ftd>\n\u003Ctd>Many requests from hosting-network addresses, or one address with many numbers\u003C\u002Ftd>\n\u003Ctd>Real users sit on home and mobile networks\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Accounts\u003C\u002Ftd>\n\u003Ctd>Many sessions that never complete the signup, or share one device\u003C\u002Ftd>\n\u003Ctd>Pumping needs the send, not the account\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The best single indicator is conversion, the share of sent codes that users complete. Track it per country and per number prefix. A normal figure for your product is a baseline you build from your own traffic, and any lasting drop is the alarm.\u003C\u002Fp>\n\u003Ch2 id=\"why-a-bare-verification-form-is-easy-prey\">\u003Ca class=\"heading-link\" href=\"#why-a-bare-verification-form-is-easy-prey\">\u003Cspan>Why a bare verification form is easy prey\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Three defaults make forms vulnerable:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>No cost to the attacker.\u003C\u002Fstrong> A request needs no account and no payment.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The send happens before any judgment.\u003C\u002Fstrong> The number is texted as soon as it is submitted.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>One request maps to one message.\u003C\u002Fstrong> There is no limit on how many an address, a session or a number can trigger.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Every defence below removes one of these.\u003C\u002Fp>\n\u003Ch2 id=\"defences-in-the-order-to-build-them\">\u003Ca class=\"heading-link\" href=\"#defences-in-the-order-to-build-them\">\u003Cspan>Defences, in the order to build them\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Ch3 id=\"1-choose-who-you-send-to\">\u003Ca class=\"heading-link\" href=\"#1-choose-who-you-send-to\">\u003Cspan>1. Choose who you send to\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Keep a list of the countries where you have customers and send codes only there. For every other country, offer another channel or manual review. This one rule removes most of the money on offer, because attackers choose destinations by payout, not by your customer base. Review the list when your business changes.\u003C\u002Fp>\n\u003Ch3 id=\"2-validate-the-number-before-any-message\">\u003Ca class=\"heading-link\" href=\"#2-validate-the-number-before-any-message\">\u003Cspan>2. Validate the number before any message\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Check the number against the numbering plan and the line type before you pay to send. With the Qelka phone API:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Refuse numbers that are not valid, so impossible numbers cost nothing.\u003C\u002Fli>\n\u003Cli>Refuse \u003Ccode>premium_rate\u003C\u002Fcode> and \u003Ccode>shared_cost\u003C\u002Fcode> numbers, which no signup should send a code to.\u003C\u002Fli>\n\u003Cli>Decide your policy for \u003Ccode>voip\u003C\u002Fcode> and \u003Ccode>landline\u003C\u002Fcode>: a landline cannot receive a text, so sending to it is a pure cost.\u003C\u002Fli>\n\u003Cli>Store \u003Ccode>e164\u003C\u002Fcode>, so the same number written two ways counts once in your limits.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The basic check costs 1 credit and never touches the phone network, so it is far cheaper than a message. See \u003Ca href=\"\u002Fblog\u002Fphone-number-validation\">phone number validation\u003C\u002Fa>. Be honest about its reach: many pumped numbers are valid ordinary numbers, so validation is a floor, not a ceiling.\u003C\u002Fp>\n\u003Ch3 id=\"3-limit-by-number-by-session-and-by-network\">\u003Ca class=\"heading-link\" href=\"#3-limit-by-number-by-session-and-by-network\">\u003Cspan>3. Limit by number, by session and by network\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Rate limits should sit on every dimension an attacker has to vary:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Limit\u003C\u002Fth>\n\u003Cth>Example\u003C\u002Fth>\n\u003Cth>Stops\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Per number\u003C\u002Ftd>\n\u003Ctd>3 codes per hour, then a cooldown\u003C\u002Ftd>\n\u003Ctd>Hammering one target\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Per account or session\u003C\u002Ftd>\n\u003Ctd>5 sends per day\u003C\u002Ftd>\n\u003Ctd>A single script session\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Per IP address and per ASN\u003C\u002Ftd>\n\u003Ctd>A low ceiling for hosting networks\u003C\u002Ftd>\n\u003Ctd>Bulk submission from one place\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Global per country\u003C\u002Ftd>\n\u003Ctd>A daily cap on sends to each country\u003C\u002Ftd>\n\u003Ctd>Runaway spend\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Pick the numbers from your own traffic, not from ours. \u003Ca href=\"\u002Fglossary\u002Frate-limiting\">Rate limiting\u003C\u002Fa> explains the mechanics.\u003C\u002Fp>\n\u003Ch3 id=\"4-add-friction-before-the-send-not-after\">\u003Ca class=\"heading-link\" href=\"#4-add-friction-before-the-send-not-after\">\u003Cspan>4. Add friction before the send, not after\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Put a challenge between the form and the SMS: a CAPTCHA, a proof-of-work or a confirmation by email. A message that has been sent is paid for, whether or not the attempt succeeds. A step that happens earlier costs the attacker time and costs you nothing.\u003C\u002Fp>\n\u003Ch3 id=\"5-use-the-ip-as-a-signal\">\u003Ca class=\"heading-link\" href=\"#5-use-the-ip-as-a-signal\">\u003Cspan>5. Use the IP as a signal\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>An address that belongs to a hosting network, a Tor exit or a known proxy network is more likely to be a script than a person. The \u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fip\">IP API\u003C\u002Fa> returns \u003Ccode>asn.type\u003C\u002Fcode>, four flags and a risk score. Use them to require an extra step, not to ban outright, since real users sit behind VPNs too. \u003Ca href=\"\u002Fblog\u002Fip-fraud-score\">IP fraud score\u003C\u002Fa> shows how to read them, and residential proxies, which carry no flag, are covered in \u003Ca href=\"\u002Fblog\u002Fresidential-proxies\">residential proxies\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch3 id=\"6-cap-the-damage\">\u003Ca class=\"heading-link\" href=\"#6-cap-the-damage\">\u003Cspan>6. Cap the damage\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>Set a daily budget per country in your messaging provider's console, or in your own code, and alert when it is half spent. A cap does not stop the fraud. It stops the invoice.\u003C\u002Fp>\n\u003Ch3 id=\"7-offer-other-ways-to-verify\">\u003Ca class=\"heading-link\" href=\"#7-offer-other-ways-to-verify\">\u003Cspan>7. Offer other ways to verify\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>If an email code, an authenticator app or a passkey does the job, make that the default and keep SMS for the cases that need it. Every flow that does not send a message is a flow that cannot be pumped.\u003C\u002Fp>\n\u003Ch2 id=\"a-gate-in-front-of-the-send\">\u003Ca class=\"heading-link\" href=\"#a-gate-in-front-of-the-send\">\u003Cspan>A gate in front of the send\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The check below runs on your server before you ask your provider to send a code. It validates the number, applies your country rule and looks at the client address.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">javascript\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-javascript\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> API\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'https:\u002F\u002Fapi.qelka.com\u002Fv1'\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> allowedCountries\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> new\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> Set\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">([\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'US'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'CA'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'GB'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'FR'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'DE'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">])\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> function\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">path\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">body\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> response\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> fetch\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">`${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}\u002F${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">path\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    method: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'POST'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    headers: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">      Authorization: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">`Bearer ${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">process\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">env\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">      'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'application\u002Fjson'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    body: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">JSON\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">stringify\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(body),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    signal: AbortSignal.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">timeout\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">5000\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> response.ok \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> response.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">json\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">() \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> null\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">export\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> function\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> mayTextCode\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">phone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">country\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#E36209;--shiki-dark:#FFAB70\">ip\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> number\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'phone'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, country \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { phone, country } \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { phone })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">number) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'lookup_failed'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">number.valid) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'invalid_number'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">allowedCountries.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">has\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(number.country.code)) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'country_not_served'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> ([\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'premium_rate'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'shared_cost'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'landline'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'pager'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'voicemail'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">].\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">includes\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(number.line_type)) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">    return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">false\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, reason: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'line_type'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> address\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> lookup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'ip'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, { ip })\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> risky\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> address \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">&#x26;&#x26;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (address.risk.level \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> 'high'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> ||\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> address.flags.datacenter)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  return\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> { send: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">true\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, e164: number.e164, challenge: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Boolean\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(risky) }\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>Two choices in that code are deliberate. When the lookup fails, it does not send: a code is a paid action, so the safe failure here is to hold it, and the user can retry. And a risky address does not block the request, it sets \u003Ccode>challenge\u003C\u002Fcode>, so the caller can ask for a CAPTCHA or an email step first. Note that the \u003Ccode>ip\u003C\u002Fcode> call returns a \u003Ccode>422\u003C\u002Fcode> for private addresses such as \u003Ccode>127.0.0.1\u003C\u002Fcode>; in local development, treat that as no signal. Combine the gate with the per-number and per-IP limits above; the gate alone does not count requests.\u003C\u002Fp>\n\u003Ch2 id=\"mistakes-that-keep-the-fraud-profitable\">\u003Ca class=\"heading-link\" href=\"#mistakes-that-keep-the-fraud-profitable\">\u003Cspan>Mistakes that keep the fraud profitable\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Counting only per IP.\u003C\u002Fstrong> Attackers rotate addresses. Limit per number and per account as well.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Allowing every country by default.\u003C\u002Fstrong> A country list is the cheapest control you have.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Sending first and validating later.\u003C\u002Fstrong> The message is gone and paid for by then.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Treating \u003Ccode>valid\u003C\u002Fcode> as safe.\u003C\u002Fstrong> A valid number can still be an attacker's number.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Alerting on cost only.\u003C\u002Fstrong> By the time the bill moves, the damage is done. Alert on conversion and on sends per country.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Blocking VPN users.\u003C\u002Fstrong> Add a challenge instead; the people behind VPNs are often real.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"a-note-on-figures\">\u003Ca class=\"heading-link\" href=\"#a-note-on-figures\">\u003Cspan>A note on figures\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>You will see large loss numbers quoted for SMS fraud. We do not repeat them here, because we could not tie them to a primary source we can link. What you can measure is your own: sends per country, conversion per prefix and spend per day. Those are the figures that tell you whether you are being hit, and whether a control works.\u003C\u002Fp>\n\u003Ch2 id=\"where-to-go-next\">\u003Ca class=\"heading-link\" href=\"#where-to-go-next\">\u003Cspan>Where to go next\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fprevent-fake-signups\">Stopping fake signups\u003C\u002Fa> combines email, phone and IP checks.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Fvalidate-phone-numbers-in-signup-form\">Validate phone numbers in a signup form\u003C\u002Fa> shows the form side.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fuse-cases\u002Fsms-deliverability\">SMS deliverability\u003C\u002Fa> covers the sending side of the same checks.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fphone-validation-api\">Phone validation API\u003C\u002Fa> has pricing and volumes.\u003C\u002Fli>\n\u003C\u002Ful>\n",[11,15,18,21,24,28,31,34,37,40,43,46,49,52,55],{"id":12,"text":13,"depth":14},"how-the-scheme-works","How the scheme works",2,{"id":16,"text":17,"depth":14},"what-it-looks-like-in-your-data","What it looks like in your data",{"id":19,"text":20,"depth":14},"why-a-bare-verification-form-is-easy-prey","Why a bare verification form is easy prey",{"id":22,"text":23,"depth":14},"defences-in-the-order-to-build-them","Defences, in the order to build them",{"id":25,"text":26,"depth":27},"1-choose-who-you-send-to","1. Choose who you send to",3,{"id":29,"text":30,"depth":27},"2-validate-the-number-before-any-message","2. Validate the number before any message",{"id":32,"text":33,"depth":27},"3-limit-by-number-by-session-and-by-network","3. Limit by number, by session and by network",{"id":35,"text":36,"depth":27},"4-add-friction-before-the-send-not-after","4. Add friction before the send, not after",{"id":38,"text":39,"depth":27},"5-use-the-ip-as-a-signal","5. Use the IP as a signal",{"id":41,"text":42,"depth":27},"6-cap-the-damage","6. Cap the damage",{"id":44,"text":45,"depth":27},"7-offer-other-ways-to-verify","7. Offer other ways to verify",{"id":47,"text":48,"depth":14},"a-gate-in-front-of-the-send","A gate in front of the send",{"id":50,"text":51,"depth":14},"mistakes-that-keep-the-fraud-profitable","Mistakes that keep the fraud profitable",{"id":53,"text":54,"depth":14},"a-note-on-figures","A note on figures",{"id":56,"text":57,"depth":14},"where-to-go-next","Where to go next",[59,62,65,68,71,74],{"q":60,"a":61},"What is SMS pumping fraud?","SMS pumping, also called artificial inflation of traffic or AIT, is abuse of any form that sends a text message. Bots trigger verification codes to numbers on routes where the destination network earns money per message, and the attacker shares in it. You pay for every message, and no real user ever reads one. The usual targets are signup, login and password reset forms that send an SMS code.",{"q":63,"a":64},"How do I know if I am being hit by SMS pumping?","Watch your message logs for signs that traffic is not people: a spike in codes sent to countries you do not serve, many numbers from the same prefix or in sequence, a falling share of codes that get entered, and bursts from hosting-network IP addresses. The most reliable signal is conversion: the percentage of sent codes that users complete. When it drops while sends climb, someone is pumping.",{"q":66,"a":67},"Does a CAPTCHA stop SMS pumping?","It helps against simple scripts and should sit before the send, but it does not stop people or services that solve challenges for a fee. Treat it as one layer. Limits per number, per IP and per account, a list of countries you serve, validation of the number before any message and a daily spending cap per country do more of the work.",{"q":69,"a":70},"Can phone validation prevent SMS pumping?","It removes the cheapest attacks, not all of them. Checking that the number is valid, that its line type fits and that its country is one you serve stops impossible numbers and obvious premium-rate ranges before they cost a message. Many pumped numbers are valid on ordinary routes, so pair validation with rate limits, country rules and conversion monitoring.",{"q":72,"a":73},"Which countries are targeted by SMS pumping?","There is no stable list, and any list we gave would go stale. What matters is which destinations your own traffic shows you never serve. Allow the countries where you have users and refuse or add friction for the rest. Review your delivery reports by country regularly, because attackers move to wherever termination pays and your protections are weakest.",{"q":75,"a":76},"Do I stop sending SMS codes to avoid pumping?","You do not have to. Offer a second channel where it fits: an email code, an authenticator app or a passkey. Then limit SMS to cases that need it, such as the last step before a sensitive action, and put the checks in front of it. The goal is to make sending a code cost the attacker more than it earns them.","2026-11-24",17,1586,{},1795559739637]