301 Moved Permanent and 403 Forbidden errors

  • Unknown's avatar

    I am trying to connect to my WordPress account via xmlrpc using a code snippets below:

    
    from xmlrpc.client import Transport
    import wordpress_xmlrpc
    
    class SpecialTransport(Transport):
    user_agent = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0'
    
    wordpress_client = wordpress_xmlrpc.Client('http://theghanaianamerican.com/wp-admin', 'xxxxx', 'xxxxxxx', transport=SpecialTransport())
    ServerConnectionError: <ProtocolError for theghanaianamerican.com/wp-admin: 301 Moved Permanently>

    Using this approach:

    from wordpress_xmlrpc import Client, WordPressPost
    from wordpress_xmlrpc.methods.posts import GetPosts, NewPost
    from wordpress_xmlrpc.methods.users import GetUserInfo
    
    wp = Client('https://theghanaianamerican.com/xmlrpc.php', 'xxxxx', 'xxxxxx')
    wp.call(GetPosts())

    I get this error ProtocolError: <ProtocolError for theghanaianamerican.com/xmlrpc.php: 403 Forbidden>

    Thanks in advance!

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    I’m not sure I understand. You are trying to get an outside service to connect via XML-RPC? If so what is the name of the service so we can take a closer look?

    Thanks for the additional info!

  • Hi again,

    I forgot to mention that this is the support forum for our free sites, but your Business Yearly Plan upgrade includes priority live chat support that you can access 24 hours a day (except major holidays)

    With this in mind you are encouraged to reach out to us here, and we can take a closer look at your issue in realtime. No need to wait for a reply in the forums: https://wordpress.com/help/contact

    Hope this helps!

  • Unknown's avatar

    Thanks staff-totoro. I will follow-up at https://wordpress.com/help/contact.

  • The topic ‘301 Moved Permanent and 403 Forbidden errors’ is closed to new replies.