Security

    Rate limiting and abuse protection for mobile APIs

    A 2026 view of a mobile API server applying per-user and per-endpoint rate limits to stop password brute force and code-sending spam from a client calling the API directly

    The API behind your mobile app is reachable by anyone who inspects the app's traffic, not just by your app, and without rate limiting that openness becomes a problem. An attacker can hammer your login endpoint to guess passwords, spam your code-sending endpoint to run up SMS costs, or scrape your data by enumerating requests, all because nothing on the server slows them down. Rate limiting is the control that caps how often a client can call your API, and it has to live on the server, since the app cannot enforce it. Here is why mobile APIs need it and how to apply it.

    Short answer

    Rate limiting caps how many requests a client can make to your API in a given time, which protects against abuse like password brute-forcing, credential stuffing, code or message spamming, scraping, and cost abuse of expensive endpoints. Per OWASP, unrestricted resource consumption is a top API risk, and the defense lives on your server, because an attacker calls your API directly and the app cannot enforce limits. Apply per-user, per-IP, and per-endpoint limits, throttle or challenge suspicious activity, and protect sensitive endpoints like login, signup, and code-sending especially. The mobile app is just one client of the API; the server is where abuse must be stopped.

    What you should know

    • Your API is callable directly: attackers do not go through your app.
    • Rate limiting is server-side: the app cannot enforce it.
    • It stops abuse: brute force, spam, scraping, and cost abuse.
    • Protect sensitive endpoints: login, signup, and code-sending most of all.
    • It is a top API risk: unrestricted resource consumption is on the OWASP API list.

    Why do mobile APIs need rate limiting?

    Because the API is exposed to direct calls, and without limits a single client can do unlimited damage. Your mobile app sends requests to your backend, and an attacker can inspect those requests and replay them at scale using ordinary tools, bypassing the app entirely. If nothing on the server caps the rate, that attacker can try thousands of passwords against a login endpoint, send your verification-code endpoint into a loop that costs you SMS fees, scrape your data by walking through requests, or overload an expensive endpoint. The app's own behavior, sending one request at a time, is irrelevant, because the attacker is not using your app. So rate limiting is necessary precisely because the API is a public surface, and it is the server's job to ensure no single client can consume resources or attempt actions without bound.

    What does rate limiting protect against?

    Several classes of abuse that all rely on unlimited requests. The table lists them.

    AbuseWhat rate limiting prevents
    Password brute forceTrying many passwords against a login endpoint
    Credential stuffingTesting leaked credential pairs at scale
    Code or message spamLooping a verification-code endpoint, running up costs
    Data scrapingEnumerating requests to harvest data
    Cost or resource abuseOverloading expensive endpoints

    The common thread is volume: each attack works by making far more requests than a legitimate user would, so capping the rate per client, user, and endpoint removes the advantage. Login and code-sending endpoints deserve special attention, since brute force and SMS-cost abuse are common and damaging, and they are also where account lockouts and challenges add protection on top of basic limits.

    How do you implement it?

    On the server, with limits scoped to the right dimension and tighter on sensitive endpoints. Apply rate limits per user, per IP, and per endpoint so a single client cannot exceed a reasonable request rate, and set tighter limits on sensitive actions, login attempts, signup, sending verification codes, than on ordinary reads. Add escalating responses for suspicious activity: throttle, require a challenge such as a CAPTCHA, or lock an account after repeated failed logins, rather than simply allowing endless attempts. Combine rate limiting with the other controls it supports, server-side authorization so enumeration does not leak data, and app attestation signals like App Attest or Play Integrity to distinguish your genuine app from scripts. Monitor for abuse patterns so you can tighten limits when needed. The key point is that all of this is enforced on the server, since the client cannot be trusted to limit itself.

    What to watch out for

    The first trap is assuming the app's behavior protects the API, when an attacker calls the API directly and ignores the app. The second is leaving sensitive endpoints, login, signup, code-sending, without tighter limits and lockouts, where brute force and cost abuse concentrate. The third is implementing limits only in the client, which does nothing, since enforcement must be server-side. Rate limiting is a backend control, so it is implemented and tested on your server, but a pre-submission scan such as PTKD.com (https://ptkd.com) reads your app against OWASP MASVS and surfaces the API endpoints your app calls, which is a useful inventory of the surface where rate limiting and abuse protection should be enforced. The limits themselves live on the server.

    What to take away

    • Rate limiting caps how often a client can call your API, protecting against brute force, credential stuffing, spam, scraping, and cost abuse.
    • It must be enforced server-side, because an attacker calls your API directly and the mobile app cannot enforce limits.
    • Apply per-user, per-IP, and per-endpoint limits, with tighter limits, lockouts, and challenges on sensitive endpoints like login and code-sending.
    • Combine it with server-side authorization and app attestation, and use a pre-submission scan such as PTKD.com to inventory the API surface that needs protection.
    • #rate-limiting
    • #api-security
    • #abuse-protection
    • #brute-force
    • #owasp
    • #app-security
    • #mobile

    Frequently asked questions

    Why do mobile APIs need rate limiting?
    Because the API is exposed to direct calls. An attacker can inspect your app's requests and replay them at scale with ordinary tools, bypassing the app, so without server-side limits a single client can try thousands of passwords, loop a code-sending endpoint to run up costs, scrape data, or overload an expensive endpoint. The app sending one request at a time is irrelevant, since the attacker is not using your app. Rate limiting ensures no single client can consume resources or attempt actions without bound.
    Can I rate limit in the mobile app?
    Not effectively. Client-side limits do nothing against an attacker who calls your API directly, ignoring the app, so rate limiting must be enforced on the server. The app can be polite about how often it calls, but that is for user experience, not security. The control that actually stops abuse is server-side, capping requests per user, IP, and endpoint, because the server is the only place that sees and can refuse every request regardless of who or what made it.
    What does rate limiting protect against?
    Abuse that relies on unlimited requests: password brute force against a login endpoint, credential stuffing with leaked pairs, spamming a verification-code endpoint to run up SMS costs, scraping data by enumerating requests, and overloading expensive endpoints. Each works by making far more requests than a legitimate user would, so capping the rate per client, user, and endpoint removes the advantage. Login and code-sending endpoints deserve the tightest limits, plus lockouts and challenges.
    How do I implement rate limiting?
    On the server, scoped per user, per IP, and per endpoint, with tighter limits on sensitive actions like login, signup, and code-sending than on ordinary reads. Add escalating responses to suspicious activity, throttling, a challenge such as a CAPTCHA, or an account lockout after repeated failed logins. Combine it with server-side authorization so enumeration does not leak data, and with app attestation to distinguish your genuine app from scripts. Monitor for abuse patterns and tighten limits as needed.
    How does a scan relate to API rate limiting?
    Rate limiting is a backend control, so it is implemented and tested on your server, not found by inspecting the app binary. However, a pre-submission scan such as PTKD.com reads your app against OWASP MASVS and surfaces the API endpoints your app calls, which is a useful inventory of the surface where rate limiting and abuse protection should be enforced. You then verify, on the server, that sensitive endpoints like login and code-sending have appropriate limits and lockouts.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free