Non-admin access to XML-RPC methods
I’m rather new to WP so please forgive me if this question has been asked and answered many times over (though I cant seem to find it when searching these forums).
My situation is thus: a client has a website that is entirely WP ran. At this stage i’m unsure whether it’s on WP.com or their own installation. I have been briefed with building an iPhone app that integrates with their blog. The important detail to remember here is that the app is intended to be used by anyone who likes their blog. It is not designed to be used by the admin/owner/editor/etc of the blog (though it could be I suppose).
So, I’ve checked out several of the xml-rpc calls that are available to developers, and I’ve quite successfully sent requests and received responses via. a test asp.net page (created simply to test capabilities of the xml-rpc api).
During testing I noticed something a little peculiar, though it could just be my mistaken understanding of the xml-rpc api and it’s intention. I was testing the blogger.getRecentPosts using a “normal” wp username and password (i.e. a subscriber account) and noticed that NO posts were returned by the xml-rpc api. Changing the details to the owner, I did receive posts.
This has led me to the not-all-that-startling conclusion that for retrieving lists of posts one must use admin (or editor as I also discovered) credentials.
I just wanted to make sure this was correct in the first instance, and if so ask if anyone knows another way to achieve what I’m trying to do.
The blog I need help with is androidprotodev.wordpress.com.
If you give us the URL of the site, we can at least tell you if it’s WP.com or WP.org.
For either case (WPCOM or WPORG) the XML-RPC APIs are targeted at management features. If you just want to fetch recent posts you’d be better off grabbing the RSS feed and parsing out the data you need from there.
Rss feed you say? Now why didn’t I think of that….thanks for the suggestion!
The topic ‘Non-admin access to XML-RPC methods’ is closed to new replies.