Goodreads Developers discussion

47 views
Need some help with add_to_shelf.xml

Comments Showing 1-3 of 3 (3 new)    post a comment »
dateDown arrow    newest »

message 1: by Rob (new)

Rob (rpboland) | 9 comments Hi all,

I'm trying to get the add_to_shelf command to work but am not having much luck so far. Whenever I send the post request, goodreads returns a message saying 'not authorized'. No other info is provided, can anyone help clarify this for me?

I have connected via oauth and am using the access-token (can post code here if necessary).

Funnily enough, if I manually type the url into my browser the book is added correctly:
http://www.goodreads.com/shelf/add_to...

But accessing the same url from my script returns 'not authorized',

Anyone have any ideas? Or could someone post a code snippet for this command which works correctly?

Thanks a lot!


message 2: by Adam (new)

Adam (jademason) | 66 comments I'm going to assume that you are using the signpost oauth library. If so, Casper tracked down the solution to that issue in this thread:

http://www.goodreads.com/topic/show/3...

The quick answer is to read the following thread and download the modified version of signpost.

http://code.google.com/p/oauth-signpo...


message 3: by Rob (new)

Rob (rpboland) | 9 comments Cheers Adam. Actually i'm not using the signpost library (my oauth code is PHP), but I managed to find the problem.

It was a basic mistake in the end. I muddled up some copy/pasting and I was using the request token instead of the access_token - d'oh!

So 'not authorized' appears to be a quite reasonable error message.

Funny that you appear to be able to go bypass proper OAuth by typing the URL into the browser window (Or is there another reason that works?). It kind of pointed me in the wrong direction.


back to top