6

    I want to develop an Open Source Project with Stack Exchange API. So I have to publish the API key there. But a single IP address can only make a certain number of API requests per day, depending on the presence of a valid API key. So I need to protect my API key. How can I do that?

    An API key may use in a html page or in a JavaScript code, which will be easily available to others.

    An another reason to protect my API key is to stop unwanted usage of the API key. Anyone can use my API key to test there applications. I want to protect that.

    How can I do that?

2 Answers 2

6

The name 'key' is a bit misleading.

It is not your 'license', it is simply a means of controlling anonymous access to the api and to gather usage metrics.

So, while there is no value in advertising your key, there is no need to be concerned with it's visibility in your application code.

4

The request limit is per-IP and not per-key. Therefore you needn't worry about exposing your API key.

2
  • And whats about my second problem: An another reason to protect my API key is to stop unwanted usage of the API key. Anyone can use my API key to test there applications. I want to protect that.? Commented Sep 10, 2010 at 7:59
  • 2
    There's nothing you can do about that. Commented Sep 10, 2010 at 16:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .