WordPress Jetpack Json API not working

i’m trying to use Json API from Jetpack, but when i make the call i only get this:

{"error":"unknown_blog","message":"Unknown blog"}

I’m trying this: https://public-api.wordpress.com/rest/v1.1/sites/clasari.com/wp/posts/

Read More

The blog is hosted at wp folder (inside clasari.com) solo the blog url is clasari.com/wp, i guess that can be a problem.

I’ve also tried

https://public-api.wordpress.com/rest/v1.1/sites/clasari.com::wp/posts/

but it has the same result.

Any idea of what can be this problem? Thank you for your help

Related posts

1 comment

  1. You need to use urlencode, like this:

    $url = 'clasari.com/wp';
    $url = url_encode( $url );
    
    $request =
      'https://public-api.wordpress.com/rest/v1.1/sites/' .
      $url .
      '/posts/';
    

Comments are closed.