WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Posterous Importer] Got HTTP 401 from Posterous API

[Resolved] [Plugin: Posterous Importer] Got HTTP 401 from Posterous API

  • Not entirely sure where the error lies, but it seems like there is something wrong with the constructor function or how it passes username/password.

    I found I consistently got 401 http response from the Posterous API for http://posterous.com/api/getsites, though I knew my authorization was correct.

    What I did was to find the call to:
    $data = $this->get_page( $url, $this->username, $this->password );
    And hard code in the username and password:
    $data = $this->get_page( $url, 'myusername', 'mypassword');

    (This was line 105 in the 0.9 version).

    That got my past the get_sites call, but then it was failing on getting the posts. (403 status on the call to http://posterous.com/api/readposts).

    Realizing my posts (on the posterous side) were public, and didn’t require authorization, I just changed line 157 from:
    $data = $this->get_page( $url, $this->username, $this->password );
    to:
    $data = $this->get_page( $url);

    I still had to put in the username and password when submitting the form to pass the jquery test, but once I bypassed that I was successfully able to import 50+ posts and over 450 comments from a Posterous site without trouble.

    http://wordpress.org/extend/plugins/posterous-importer/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: Posterous Importer] Got HTTP 401 from Posterous API’ is closed to new replies.