TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An Alternative to Required API Keys

30 pointsby EzGraphsalmost 12 years ago

6 comments

ProblemFactoryalmost 12 years ago
One good bit of advice I have seen for people who are just starting out with publishing an API: require a &quot;developer email&quot; parameter in the request instead of API key.<p>Yes, it could be spoofed or faked. But:<p>* You can detect honest, accidental excessive usage and follow up by email,<p>* You can block new email addresses but keep the API up for existing users if hit by a randomised bot,<p>* You can follow up with developers, and interview them to see what they are using the API for,<p>* There is an obvious way to get in touch with developers to tell them about API changes,<p>* And you can start out with this by just logging requests to a database&#x2F;file&#x2F;cache, without building a full &quot;developer portal&quot;.
评论 #6166004 未加载
TillEalmost 12 years ago
&gt; Rate limiting is one approach but it is easily gamed.<p>Is it? Simple IP-based rate limiting seems quite effective to all but the most determined abuser.
评论 #6166034 未加载
martin-adamsalmost 12 years ago
To me it seems like hanging would be more of a deterrent than failing requests as developers could simply retry a request on a simulated failure.<p>Some developers could even try to fire multiple requests and use the fastest one, effectively reducing the failure rate to the app.<p>It an interesting problem to solve. The one that I would like to see a solution on is allowing end users interact directly with a third party service without exposing the API key or requiring the to do any authentication.
评论 #6165874 未加载
评论 #6166235 未加载
onion2kalmost 12 years ago
If you&#x27;re trying to put people off abusing it, wouldn&#x27;t randomly failing make the situation worse? People will just code apps to try the request again until it doesn&#x27;t. It&#x27;d be like inviting people to DDoS your API. So long as the display bit is asynchronous then the user will just see a spinner until it&#x27;s worked and the results are sent across.
chiphalmost 12 years ago
<i>Required keys make it much harder for developers to learn new things.</i><p>Really? You fill out a form, click submit, get your key via email soon after. Or at worst, the following Monday. IMO, that&#x27;s not a lot of friction.
评论 #6166272 未加载
moron4hirealmost 12 years ago
how hard is it to run a second, smaller server for &quot;learning&quot; that doesn&#x27;t get rate limited but also doesn&#x27;t have full access? Maybe it even only has access to a fake data set, no real data.