Goodreads Developers discussion

26 views
questions > Books from shelf return forbidden

Comments Showing 1-5 of 5 (5 new)    post a comment »
dateUp arrow    newest »

message 1: by Heidi (new)

Heidi (unfolder) | 3 comments I've built this PHP application that get the shelves from a user.
Based on which shelf the user selects, the books from this shelf are shown.

The problem is, whenever I change my "Who can view my profile" settings to anything but "anyone", the books from the selected shelf xml file returns "Forbidden".

Getting the shelves isn't a problem when I have that setting on "goodread members" or "just my friends", but requesting the books on a particular shelf returns forbidden.

If I have it set to "anyone" the application runs without any problems.

This is how I request the book information from the shelf:
$url = "http://www.goodreads.com/review/list?..." . $userid . "&shelf=" . $shelf . "&sort=author" . "&key=" . $key . "&order=a&per_page=infinite";

Could anyone help me figure this out?
thnx!
Heidi


message 2: by Michael (new)

Michael Economy (michaeleconomy) are you using oauth?


message 3: by Heidi (new)

Heidi (unfolder) | 3 comments Hello Michael,
Yes, I'm using this one http://code.google.com/p/goodreads-oa...
I get back an oauth_token and authorize=1, so it seems like that part is working ... or is there anything else I can check for that?


message 4: by Heidi (new)

Heidi (unfolder) | 3 comments Hello Michael,
Did some more searching and I figured out that I have to put the url through oauth to ask for the books of a shelf.

I'm using this now:
simplexml_load_string($obj->makeRequest('http://www.goodreads.com/review/list?...' . $userid . '&sort=author' . '&key=' . CONSUMER_KEY .'&order=a&per_page=infinite', true, null));

and it works!
Thanks a lot for pointing me in the right direction!!


message 5: by Michael (new)

Michael Economy (michaeleconomy) :D


back to top