Goodreads Developers discussion
bugs
>
Notifications API
date
newest »


We will be removing this behavior.

Other OAuth GET calls seem to work:
* Get id of user who authorized OAuth.
* Get a list of topics with unread comments.
* Get a user's friends.
* Get your friend updates.
* Compare books with another member.
* List books owned by a user.
While others are giving a 401 error
* See the current user's notifications.
* Get a user's followers.
* Get people a user is following.
They use fundamentally the same code (different URL's) so I'm confused why I can't get them to work.


I've got a small set of API's that are giving me a 401 error and no resolution as of now:
notifications-OAuth — See the current user's notifications, returns 401, not authorized errors
review.create-OAuth — Add review, returns 401, not authorized errors
review.destroy-OAuth — Destroy a review, returns 401, not authorized errors
review.update-OAuth — Update book reviews, returns 401, not authorized errors
user.followers — Get a user's followers, both OAuth and non-OAuth calls return 401, not authorized errors
user.following — Get people a user is following, both OAuth and non-OAuth calls return 401, not authorized errors
Given that other, virtually equivalent, API calls are working, both OAuth and non-OAuth, the 401 not authorized errors appear to be a problem on the Goodreads side the best I can tell.
And I've got one more generating a different but unexpected error:
followers.create-OAuth — Follow a user, always returns OK response with data = '$("follow_container_user_7535600").update("Something went wrong! Follower can't be blank");'

I haven't tried followers or following, but those are just as likely to be broken.
review.create/destroy/update look fine. square brackets, maybe?

Can you double check the URL's and parameters on the documentation for me? I have found, and reported, a couple of instances where the problem ended up being the documentation.

Destroy a review has an API documentation error and returns a bad result. Changing from 'review/destroy.xml' with the book ID as a parameter to 'review/destroy/' now works but generates a 302 redirect, which the library I'm using interprets as an error (according to their documentation only results in the 200 range are considered "ok" responses).
Update (edit) a review with 'review/.xml' gives a 404 not found error. Same with 'review/' and the variants. Trying 'review/edit/.xml' gives a 401 unauthorized error.
Using 'review/edit/' gives a 302 redirection but doesn't update the review (unlike destroy with does do the delete). So the closest URL is 'OAUth PUT URL => http://www.goodreads.com/review/edit/...'

POST review/destroy.xml (with book_id param)
POST review/destroy (with format=xml and book_id params)
You should not use review/destroy/.
review/edit is not really an API we published as far as I know. I see you have opened another topic for problems updating a review, so I'll answer there.
The next on the list is "See the current user's notifications". I got 401 not authorized error when I made the call using the same OAuth structure as the User ID call so I was looking at the API documentation and noticed a sample URL link.
When I clicked it, I expected a not authorized error since it would have been without the OAuth authorization. Instead I got a XML response. How does it know whose notifications to return if you aren't using OAuth?
Any ideas???