Title: Request feature : authentification
Last modified: August 21, 2016

---

# Request feature : authentification

 *  [sireneweb](https://wordpress.org/support/users/sireneweb/)
 * (@sireneweb)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/)
 * Hi,
    thanks for your great plugin, is it possible to add simple authentification
   method by key in next version ? with this protection anonymous user can’t use
   json API or scraping content
 * For example :
    [http://www.example.org/?json=1&api_key=145dfg4654x65b1vb](http://www.example.org/?json=1&api_key=145dfg4654x65b1vb)
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [rutgervanw](https://wordpress.org/support/users/rutgervanw/)
 * (@rutgervanw)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914038)
 * I have authentication implemented with this API. How I did it:
 * – first specify an api path in the plugin options, mine was /api
    – make a folder
   in the document root of your site, in this case a folder named “api” – now place
   a .htaccess file in this directory (and nothing else) – the contents of the .
   htaccess file:
 * AuthUserFile /etc/users
    AuthName “This is a protected area” AuthGroupFile /dev/
   null AuthType Basic Require valid-user
 * – Now go to your terminal and make a file called ‘users’ in /etc
    – to add users
   follow this tutorial: [http://www.htaccesstools.com/htpasswd-generator/](http://www.htaccesstools.com/htpasswd-generator/)
 *  Thread Starter [sireneweb](https://wordpress.org/support/users/sireneweb/)
 * (@sireneweb)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914042)
 * Thanks for your sharing 🙂
    i will try to test it in next days
 *  [rutgervanw](https://wordpress.org/support/users/rutgervanw/)
 * (@rutgervanw)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914054)
 * For clarity, this implements basic http authentication. So you can access it 
   with a username and password, not with an API key as asked above. But almost 
   every HTTP client (for example curl) has support for http basic aut. Good luck!
 *  [Beer](https://wordpress.org/support/users/beer/)
 * (@beer)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914228)
 * Would changing the path from /api be kind of like passing a secret key? You might
   change it to /api-secret-wp123ab390ef4098 for example, and change it again the
   next week or as needed.
 *  Thread Starter [sireneweb](https://wordpress.org/support/users/sireneweb/)
 * (@sireneweb)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914229)
 * good news 🙂
 *  [cvillaronga](https://wordpress.org/support/users/cvillaronga/)
 * (@cvillaronga)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914241)
 * rename the API is a great choice, however if do you need some grained features
   as roles, actions or audits, you can combine the API with a RBAC or LDAP tools(
   as an aspect) it can be more secure and specific.
 *  [hdsq2](https://wordpress.org/support/users/hdsq2/)
 * (@hdsq2)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914249)
 * if I implement this, will still be possible setting a json query variable and
   all authentication will not work? or this work to both (/api and json query) ?
   (
   [http://www.mysite.com/?json=get_recent_posts](http://www.mysite.com/?json=get_recent_posts))
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Request feature : authentification’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

 * 7 replies
 * 5 participants
 * Last reply from: [hdsq2](https://wordpress.org/support/users/hdsq2/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/request-feature-authentification/#post-3914249)
 * Status: not resolved