Jetpack by WordPress.com
[resolved] Can't authorize Jetpack for JSON API (5 posts)

  1. CarlBeckel
    Posted 2 years ago #

    server: lighttpd & php5.2
    Jetpack version 2.1.2 but was also happening with 2.1.1 earlier today

    Also tested on a different wordpress installation on another server (apache & php5.3) with same results

    Trying to authorize use of the OAUTH JSON API on an installed wordpress site using jetpac. The site shows up in the dropdown on WordPress.com but authorizing the site results in:

    You must connect your Jetpack plugin to WordPress.com to use this feature.

    It's connected. I'm already pulling stats data. Trying to look in the code for the problem gets me to here:

    // jetpack.php line 3504
    if ( !isset( $tokens[$user_id] ) || !$token = $tokens[$user_id] ) {
    	return false;

    It's returning false because a print_r reveals

    $tokens = Array
        [4] => ioB$)- edited for security -FCfC5Mol.4

    Thanks for your help!


  2. CarlBeckel
    Posted 2 years ago #

    Forgot to mention $user_id = 1 - where this is called it's always passed as 1.

    Also discovered that the url passed to jetpack with the oauth code appears to have been stuck in a loop urlencoding parts of itself over and over with the same variables added back every time. For example there are about 6 instances of redirect_uri in there urlencoded multiple times. I don't want to post it because it contains tokens, but maybe somethings going wrong there.

  3. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    Thanks for the report.

    Could you send us the extra details about redirect_uri via our contact form, here:

    If you mention this thread in your email, I'll be happy to take a look!

  4. Sorbing
    Posted 2 years ago #

    I also did not work oAuth authorization on my own blog (http://blog.sectorit.net).
    This my example clienŠµ: http://note.sectorit.net/oauth/index.php
    I can pass authorization on wordpress.com, but its not work for my blog. What am I doing wrong? Thanks.

  5. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    @Sorbing Could you contact us via this contact form to give us more details about your issue?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic