Title: Consume API on same domain
Last modified: August 30, 2016

---

# Consume API on same domain

 *  [vaniivan](https://wordpress.org/support/users/vaniivan/)
 * (@vaniivan)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/consume-api-on-same-domain/)
 * Is it possible to consume rest api (or any other way to get the json representation
   of an object) on same domain from a php plugin?
    Guzzle, curl and file_get_contents
   all return null, when i call an url on the same domain.
 * [https://wordpress.org/plugins/json-rest-api/](https://wordpress.org/plugins/json-rest-api/)

The topic ‘Consume API on same domain’ is closed to new replies.

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

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [vaniivan](https://wordpress.org/support/users/vaniivan/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/consume-api-on-same-domain/)
 * Status: not resolved