These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Validating API keys - Errors?

Author
Spymaster Alpha
EveTech Enterprises
#1 - 2011-11-07 21:03:59 UTC
So I have a site where people input an API key. I need to verify this and get the access mask. So, I use the api/APIKeyInfo.xml.aspx call to verify.

Problem: if it's an invalid key, I get an "error 203". If you generate too many errors, you get banned from the API.

Question: what's to keep people from real-life griefing me and just continuously inputing fake keys so I generate too many errors? Is there a way to validate without generating an error?
Trenker
#2 - 2011-11-07 21:07:52 UTC
Spymaster Alpha wrote:
Is there a way to validate without generating an error?

Not directly, but you can use a simple regex to check if the input can be a keyID or vCode. As strict as possible.

Spymaster Alpha wrote:
what's to keep people from real-life griefing me and just continuously inputing fake keys so I generate too many errors?

Make it anoying to enter invalid keys could work pretty well, eg: in case of an error, delay the output for two seconds or more and ban the IP address for an hour after five invalid inputs ...
Spymaster Alpha
EveTech Enterprises
#3 - 2011-11-07 21:11:41 UTC
Good points. Are there any details on the exact numbers of error calls before you get banned (temporarily or permanently)?
Callean Drevus
Perkone
Caldari State
#4 - 2011-11-07 22:00:50 UTC
I believe I've read somewhere that you should be safe if you do not make it too obvious (which in my mind was sustained erroring for a while).

Anyway, I'm not blocked yet, and I'm pretty certain I'm generating a few errors every minute.

Developer/Creator of EVE Marketeer