Open
Description
I'm trying to figure out how to use WPAPI with a Wordpress.com-hosted blog.
const wp = new WPAPI({
endpoint: 'https://MYSITE.wordpress.com/wp-json'
})
const posts = await wp.posts().get()
console.log(`posts:`, posts)
But I'm getting “Not Found” errors (if I set the Wordpress privacy to "Private" I get no error!).
I'm used to interacting with Wordpress REST API at https://public-api.wordpress.com/rest/v1.1/sites/MYSITE.wordpress.com/posts but the /wp-json
route doesn't seem to be available.
What to do?