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'm working on a WordPress plugin that displays all Questions or Answers from a given user in a given Stack site. In my config file, instead of checking for IMPLICIT, I'm simply using

// if(defined('IMPLICIT'))
// {
    API::$key = 'MY-KEY';
    Auth::$client_id = MY-CLIENT-ID;
// }
// else
// {
//    API::$key = '';
//    Auth::$client_id = 0;
//    Auth::$client_secret = '';
// }

I created a StackApp in http://stackapps.com/apps/oauth/view/MY-CLIENT-ID, filled the oAuth Domain with my own and left this options unchecked:

client side oauth and desktop application oauth redirect url

I'm not sure about:

  1. Is the API Key dependent on the domain where the plugin is running?

  2. Is this a correct configuration for public release and anonymous usage?

  3. Or should I request the plugin users to enter their own key and client id?

As a matter of fact, my plugin works with the default $key and $cliend_id even in localhost [1]. And as the plugin does not request any private information, I think OAuth doesn't comes into play, or does it? I have zero experience with this.

I've read Handling working of PHP API key on webpage but it didn't clarify much.

[1]: it's presenting some glitches in localhost if I try the Chuck Norris query.

share|improve this question
1  
OAuth is not a factor for the data you are requesting. Matching the API key to domain is only done for Auth, so not a factor here. There is no need to make users get their own key for this. The key, in this case, just helps track usage and increase the daily quota. #2, I can't speak to. –  Brock Adams Aug 25 '13 at 23:30
    
Thanks for confirming, Brock. I'm imagining a situation where 100 persons have the plugin installed and their sites make 100 requests a day. The plugin in action, this man has 26 thousand Answers, 26kA(mazing). –  brasofilo Aug 26 '13 at 13:54
add comment

You must log in to answer this question.

Browse other questions tagged .