I have installed wordpress v4.3.1 on local WAMP server
Since you’re working in a local environment, your site is not publicly accessible and cannot communicate with third party services like WordPress.com. You consequently won’t be able to use Jetpack’s REST API, since your site isn’t connected to WordPress.com.
You can, however, use the REST API plugin instead:
https://ww.wp.xz.cn/plugins/rest-api/
http://wp-api.org/
You can interact with this API without having to connect to a third-party service like WordPress.com.
If you’d like to use Jetpack’s REST API instead, you’ll need to push your site live first, or to work on a publicly accessible sandbox.
I hope this helps.
Hi Jeremy,
Thanks for the quick reply.
I will look into that.
Just to clarify something, If I have my own WP hosting, and I wish to access my own posts etc, with the jetpack JSON API module, are all api requests sent to my site once live??
thanks again for your quick reply.
Peter
with the jetpack JSON API module, are all api requests sent to my site once live??
No, they’re sent to WordPress.com. That’s the main difference between the 2 REST APIs. Jetpack’s REST API relies on the WordPress.com infrastructure, and allows you to make requests to WordPress.com instead of the local site.
To give you an example, you could use that URL to get to the latest post on WPTavern.com:
https://public-api.wordpress.com/rest/v1.1/sites/9006382/posts/48972
Cheers,
makes much more sense.
Thanks again