Title: Web API
Last modified: August 30, 2016

---

# Web API

 *  [Khampol](https://wordpress.org/support/users/caseyj/)
 * (@caseyj)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/web-api/)
 * hi,
    All fine with plugin, I allow host by IP. in API request i click on preview
   request all fine. Preview : `{"success":{"code":200,"table":"wpc_nameman","request":"
   get_data","request_uri":"\/wordpress\/?cdbt_api_key=67d818ee22&cdbt_table=wpc_nameman&
   cdbt_api_request=get_data&","request_date":"2015-12-09T09:27:58+00:00"},"data":[{"
   id":"102","nom":"nom"},{"id":"103"...`
 * I copy now url and paste on browser of the host (i already allow its ip) i have
   this :
    `{"error":{"code":401,"desc":"Authentication Failure","request_uri":"\/
   wordpress\/?cdbt_api_key=9122E1BA-2880C178-F04258A8-E9D13CFF&cdbt_table=wpc_nameman&
   cdbt_api_request=get_data&","request_date":"2015-12-09T09:29:02+00:00"}}`
 * [https://wordpress.org/plugins/custom-database-tables/](https://wordpress.org/plugins/custom-database-tables/)

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

 *  [robchur](https://wordpress.org/support/users/robchur/)
 * (@robchur)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/web-api/#post-8902989)
 * I am getting the same problem. I believe the 401 indicate an authentication error.
   Its not clear what credentials need to be provided and by what method.
 * I will post back here if I have any luck determining.
 *  [robchur](https://wordpress.org/support/users/robchur/)
 * (@robchur)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/web-api/#post-8903142)
 * Problem solved.
 * We have misunderstood the purpose of ‘allowed hosts’ screen. The purpose is to
   define which client (IP address or FQDN) is authorized to make a call to WebAPI.
   If the client is not listed then the server will return a 401.
 * OMHO: using a white list of IP addresses for security is pretty weak as spoofing
   an IP address if fairly simple to do. However, the current implementation using
   a combination of both Address and API_Key, so assuming you are using SSL and 
   manage your keys, you should be good.
 * [@ka2](https://wordpress.org/support/users/ka2/) I would be happy to create a
   draft english manual for web api if you would like.

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

The topic ‘Web API’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-database-tables_e4e2e2.svg)
 * [Custom DataBase Tables](https://wordpress.org/plugins/custom-database-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-database-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-database-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-database-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-database-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-database-tables/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 2 replies
 * 2 participants
 * Last reply from: [robchur](https://wordpress.org/support/users/robchur/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/web-api/#post-8903142)
 * Status: not resolved