Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

    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?

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer
add comment

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

share|improve this answer
    
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.? –  chanchal1987 Sep 10 '10 at 7:59
2  
There's nothing you can do about that. –  Nathan Osman Sep 10 '10 at 16:46
add comment

You must log in to answer this question.

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