WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] REST API Broken (19 posts)

  1. antoine64
    Member
    Posted 1 year ago #

    The REST API is totally broken for 2 blogs of mine. When I use a public API method like https://public-api.wordpress.com/rest/v1/sites/mywebsite.com/posts/ I got this message :
    {"error":"token_target_mismatch","message":"The authorization token does not match the API target."}

    This method is public and doesn't need any token. I use it for months without authentication.

    The API worked fine few days ago.
    My blogs are self-hosted, use Jetpack (2.3.2) and JSON API is activated.

    Is someone has an idea ? Has API changed recently ? There is no message about that on the documentation http://developer.wordpress.com/docs/api/

    http://wordpress.org/plugins/jetpack/

  2. rmarliere
    Member
    Posted 1 year ago #

    I'm having the exactly same issue. Did you fixed it? I already tried to reconnect the jetpack but with no success.

  3. antoine64
    Member
    Posted 1 year ago #

    No I didn't.

    I also tried to reconnect jetpack, no success.

    I use the REST API in mobile apps so it's a big problem for me :/
    I tried to contact the wordpress team on twitter about that but I didn't get an answer. I hope they will see this post soon.

  4. Beren
    Member
    Posted 1 year ago #

    Having a similar issue as well. The Jetpack page says I am connected, but the API interface is not working. The debug page says my site is unable to communicate with Jetpack. I tried deactivating all plugins and switched to 2012 theme, but still I have the issue.

    Have you tried all those things? Same results?

    I am able to pull up my XMLRPC page ok.

  5. antoine64
    Member
    Posted 1 year ago #

    I didn't know the existence of the debug page !
    I have the same problem as you on the debug page berenerchamion, here is the result of the Jetpack debug page :

    It looks like your site can not communicate properly with Jetpack.
    SELF:
    Array
    (
        [headers] => Array
            (
                [server] => nginx
                [date] => Sun, 28 Jul 2013 14:30:05 GMT
                [content-type] => text/plain;charset=utf-8
                [connection] => close
                [x-pingback] => http://jetpack.wordpress.com/xmlrpc.php
                [expires] => Wed, 11 Jan 1984 05:00:00 GMT
                [cache-control] => no-cache, must-revalidate, max-age=60
                [pragma] => no-cache
                [x-hacker] => Jetpack Test
            )
    
        [body] => {"error":"Unknown Error","error_description":"An unknown error has occurred."}
        [response] => Array
            (
                [code] => 400
                [message] => Bad Request
            )
    
        [cookies] => Array
            (
            )
    
        [filename] =>
    )

    I didn't change anything on my 2 blogs so it can't be related to a theme or plugin. I think it's a problem in the plugin or on the jetpack servers.

  6. sarbjitarora
    Member
    Posted 1 year ago #

    I am facing the same issue. It was working fine earlier. Something is broken with the REST API

  7. Beren
    Member
    Posted 1 year ago #

    I fixed my access. What I did was disconnect my Jetpack completely and then re-connect it. I noticed that I had two connection indicators on teh Jetpack page, but when I disconnect both and then re-connected Jetpack now I have only one and the REST APIs work again.

    They even work when I have W3TC turned on with minification! Super!

    beren

  8. antoine64
    Member
    Posted 1 year ago #

    Where do you find two indicators ? I found one on the top of the Jetpack administration page. It says "Connected to WordPress.com". But I cannot find a second indicator !

    I already tried to disconnect and re-connect Jetpack but with no effect :(

  9. Beren
    Member
    Posted 1 year ago #

    I had a second one right there - very odd - but now it is gone.

  10. Beren
    Member
    Posted 1 year ago #

    Well - back to broken - simple requests like this:

    https://public-api.wordpress.com/rest/v1/sites/tarnaeluin.houseofbeor.net/posts?pretty=1&number=5

    fail with:
    {
    "error": "token_target_mismatch",
    "message": "The authorization token does not match the API target."
    }

  11. Beren
    Member
    Posted 1 year ago #

    Yeah I can definitely see that there must be something broken in Jetpack. From curl this command works:

    curl 'https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/7/?pretty=1'

    But if I change out the hostname and a post number for my own site I get the token mismatch above even though this call you don't need a token for.

  12. Matthew Boynes
    Member
    Posted 1 year ago #

    This is also broken for me, same issue as described above.

  13. antoine64
    Member
    Posted 1 year ago #

    You're right berenerchamion : REST API works for the official wordpress blog, and I think for all wordpress.com blogs but it is broken for all self-hosted blogs.

    We're waiting for WordPress team support !

  14. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thank you all for the reports! We're looking into it, and I'll get back to you as soon as I have some news.

  15. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    The problem should now be fixed.

    If you still experience issues, can you please use Jetpack's Debugger module to send us some more information about your site?

    1) Go to the Jetpack page in your dashboard.
    2) Click on the Debug link appearing at the bottom of the page.
    3) Click the link that says "click here to contact Jetpack support."
    4) Fill in the description box and your name and email address.
    5) Click the "Contact Support" button.

    Thanks!

  16. Beren
    Member
    Posted 1 year ago #

    Thanks Mr. Happiness!

  17. domguillemet
    Member
    Posted 11 months ago #

    I can't post photos in my articles by email. It doesn't work.
    Any idea ? I have this message : "Unknown error communicating with the Jetpack site". Thank you.

  18. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 11 months ago #

    @domguillemet Could you please start your own thread, as per the Forum Welcome?
    http://wordpress.org/support/plugin/jetpack#postform

    Thank you!

  19. nrturner
    Member
    Posted 3 months ago #

    Just wanted to say that I had a similar issue (was getting error -10520 when trying to connect to Facebook using Publicize). Disconnecting Jetpack from WordPress.com, re-connecting, and then re-connecting Facebook seemed to fix it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags