Goodreads Developers discussion

24 views
bugs > Add review

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

message 1: by Gregg (new)

Gregg (greggmarshall) | 105 comments I am getting a 401 'not authorized' error for this API when other API's are accepting similar POST calls without any issues.

POST /review.xml HTTP/1.0 Host: www.goodreads.com User-Agent: Drupal (+http://drupal.org/) Content-Length: 31 Authorization: OAuth oauth_version="1.0",oauth_nonce="8904b53bfe5a65e8e158a4e763ac1f3c",oauth_timestamp="1327529287",oauth_consumer_key="KEY",oauth_token="vBIkV8jtucKKYTvAd8rvHQ",oauth_signature_method="HMAC-SHA1",oauth_signature="2TeZI9HHq0PjwBrCR5Q3ueFB3n4%3D" book_id=920197&review[rating]=1


message 2: by Michael (new)

Michael Economy (michaeleconomy) Can you try doing this like 20 times and then tell me the timeframe?

(So i can read through the logs).


I'd suspect an oauth error, but it's hard to say.


message 3: by Gregg (new)

Gregg (greggmarshall) | 105 comments I got a 400 unprocessable entry error, then realized there already was a review for that book, so I manually deleted it and the call worked just fine.

Mysterious glitch???

Seems to work fine if there isn't a review already there. Just tried again using destroy a review, followed by add and it works just as expected.

I have no clue what changed in the mean time.


message 4: by Ettore (new)

Ettore Pasquini If you already had a review for that book for your user, trying to add a new one is not possible: you can only update it. Therefore it is correct to return a request error such as a 400. it could probably be a more precise HTTP error, such as 409, but anyway...

Once you deleted the review, there was no conflict, so that's why it worked fine.

Hope this helps. Let me know if I misunderstood you!


message 5: by Gregg (new)

Gregg (greggmarshall) | 105 comments You got it correct, it works fine if there is no review, gives a 400 error (as far as I'm concerned, any error is more/less equivalent, although from a debugging point of view it would have been nice to have it return something to indicate a review already exists).


back to top