Goodreads Developers discussion
bugs
>
Authorized POST Requests error
date
newest »


/shelf/add_to_shelf.xml?book_id=123&name=read
Also, since this is a POST request the params should likely be sent as part of the body, not in the URL.

Hi, thanks for the reply.
I was working on some little changes and the situation now is that the request works on the 2nd attempt.
I try to add to shelf or post a status, the first time it gives me the Not found error above, but then if I try it the 2nd time (without closing the app) it works fine.
What could the issue be with that? The parameters are all the same for both the requests, only things that differ obviously are the Timestamp and the nonce.
Does it always work on every 2nd POST (i.e. every other POST) or does it fail on the first post and succeed after the 2nd POST?

It always alternates, (fails, succeeds, fails, succeeds, etc.) and it always fails first.
Also it continues this pattern across different POST requests. For example, when I try to add a shelf it returns the error tag I posted before, then if I go to post a status on a book, it works on the first try because I already got the error when adding a shelf.


The first POST request (Always fails) has these headers
* "book_id" : "34084"
* "name" : "to-read"
* "oauth_consumer_key" : "XXXXXX"
* "oauth_nonce" : "6427"
* "oauth_signature_method" : "HMAC-SHA1"
* "oauth_timestamp" : "1422210309"
* "oauth_token" : "XXXXXXX"
* "oauth_version" : "1.0"
For this POST I get this response:
"Not found"
Now when I attempt to send the POST request again (This one always succeeds), it has these headers:
* "book_id" : "34084"
* "name" : "to-read"
* "oauth_consumer_key" : "XXXXXXXXX"
* "oauth_nonce" : "14219"
* "oauth_signature_method" : "HMAC-SHA1"
* "oauth_timestamp" : "1422210311"
* "oauth_token" : "XXXXXXX"
* "oauth_version" : "1.0"
This one succeeds and the book gets added to my shelf.
This is the same with all other POST requests, the first one fails and I get a not found error, and the next one always works fine

I'm running into the same problem:
https://www.goodreads.com/topic/show/...
Ettore, any chance you could help?

When trying to create a shelf (post to https://www.goodreads.com/user_shelve...), I get a 404.

Could you please provide a list of all the POST requests that you are having problem with (https://www.goodreads.com/api/index#u... seems one of them), so that we can investigate?
Thanks!

I have authenticated the user using OAuth and I am able of performing authorized GET requests successfully with no problems. However, when I try to perform an authorized POST request I always get this:
"Not found" with an "error" tag around it
For example when trying to add a book to a shelf, this is the base string for the request:
"POST&https%3A%2F%2Fwww.goodreads.com%2Fshelf%2Fadd_to_sh..."
I also get the same response when trying to become a fan of an author, and post a status as well.
Any ideas ?
Thanks