Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7091207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:09:21+00:00 2026-05-28T08:09:21+00:00

I have a REST service that’s reasonably complete and will be used with an

  • 0

I have a REST service that’s reasonably complete and will be used with an iOS app. It’s built using Ruby/Sinatra but I don’t think that really matters here.

I’m using HTTP Basic Authentication over SSL for various endpoints and that part is working very well.

Question is:
How do I stop spammers etc from calling parts of the REST service that aren’t protected via HTTP Basic Authentication?

Example: User Registration

Let’s assume the REST call is (POST) …/register_account passing a JSON object in the body.

For obvious reasons, this call cannot expect a username/password linked to a user account.

Ideas are:

1) The app has its own ‘username’ / password and some calls would check for app-credentials.
Problem: Rooting the device etc could unearth those credentials.

2) The app passes a secret token via a HTTP header to the REST Service for those calls.
Problem: Same as (1)

Are there any techniques commonly used out there to prevent such spam calls? I’m thinking maybe introduce the iPhone’s device id in the mix but haven’t identified a definite approach yet.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:09:21+00:00Added an answer on May 28, 2026 at 8:09 am

    While the app-specific code is a good idea for a first line of defense against spam, you should still implement some rate-limiting on any services you are concerned about.

    For example, if you use sessions on your REST services, you can easily rate-limit the number of calls you process from a single session. The session doesn’t have to be authenticated at all and is only used to identify a single client while they are making requests. A simple redirect back to the requested service if they try to connect without an open session is all that’s needed, and virtually all web frameworks or stacks have this built in.

    You can also rate-limit on other properties, such as IP or user-agent fingerprint, but those are less reliable than a session-based method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple REST service endpoint that is failing when I POST using
I have a self hosted WCF Rest service that I am using to simulate
I have a REST service built using Jersey. I want to be able to
I have a WCF/REST web service that I'm considering using Linq to SQL to
I have a WCF REST-service that is used by a mobile application used in
I'm using Cordys BOP and I have a REST web service that returns JSON
I have a REST service that produces a JSON output. I'm using Jersey. I
I have a REST service that returns a JSON like this: [{@id:123,name:Name}] and I'm
I have a REST service that returns a collection that contains non- normalized data.
I have a small REST service that I am running via the HttpSelfHostServer (ASP.Net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.