Goodreads Developers discussion
bugs
>
Get people a user is following
date
newest »


About the 401 responses: if I read correctly the call you make from PHP is identical to the one you make in the browser (simple key auth, same params). If that is correct, the only difference is maybe that in the browser you are (probably) authenticated as your user, so the api executes the call on your behalf; in PHP you are perhaps doing the call while not authenticated. It looks like this API requires user authentication and the docs don't specify that, so I'll update that.


I don't understand this question.

Well, not exactly. While OAuth is a safer mechanism in general and it would work in this case, I am not sure whether the current behavior with key authorization is intended or not. Basically I am not sure if this API should work like it's working right now when you use key auth, or if it should work like book.show (e.g.), which requires no user authentication at all.

Followers is
http://www.goodreads.com/user/7213498...
Following is
http://www.goodreads.com/user/7213498...
From what I am learning about the API, I suspect the two can use either syntax, but it is a bit odd and possibly confusing.

http://www.goodreads.com/user/7213498...
Also tried it without the key and still got the error
http://www.goodreads.com/user/7213498...
any ideas???

Currently, our API allows some calls to be authenticated by cookie, including the following/follower calls. When you visit the sample link of such a call in your browser, you'll see the response as though the request was signed using an OAuth token for your user. Visit the sample link in your browser while signed out, and you'll get 401 "unauthorized"
We will be removing API authentication by cookies later.


It seems that I'm stuck in the exact same situation of Greeg: when I try to get users followers/followings, the only thing I reach is an "unauthorized" error.
I tryied using oauth, as well as not using it, but unfortunatly with the same result.
It's a shame, because right now those two calls are completely useless :/

I'll open a ticket in our system to investigate.

The problem occurs only with OAuth authentication.
The samples urls provided for both calls in the API reference page (/api) work fine with a logged browser, but when I try to reach them from within my application appending all the OAuth headers to the request, I receive the 401 error.
The same code works fine on other calls, for instance I can retrieve without problems users's friends and groups, so I don't think I'm doing something wrong here.
Btw, thank you for your quick answer.


We hope to be able to investigate soon.
In the time being Gregg, I know you worked on a big project involving a comprehensive list of our api calls, did you ever get these 2 working in your app? If you can share what you did, that would be useful.

when I am using
https://www.goodreads.com/friend/user...
(I have changed the key which is incorrect so it may throw some other error that 401, but with correct key I am having 401 error)
it says not authorized
I just want a user friends list only so i am using "Get a user's friends" api from here
https://www.goodreads.com/api/index#u...
AND I haven't yet done the authorization part
so please tell me for this task do i have to do oauth first and if then please also tell me how to establish oauth here
I am currently using api as curl
and I can apply oauth in php as working on php/js project
please anyone help me here ASAP
Q) AND please also tell me can I get the response in json format rather than xml if yes then HOW please?
Q) AND In the "Get a user's friends" api, does the response contain 'email_id' of all the user friends.
Thanks for help
http://www.goodreads.com/user/7213498...
I get an xml record back
If I try the same call with (just for comparison to my PHP call)
http://www.goodreads.com/user/7213498...
I get the same response
If I try the call from my PHP, which passes
http://www.goodreads.com/user/7213498...
I get a 401 error "not authorized"
Also is there a reason the API documentation shows different formats for following and followers?
I also just tried the Get a user's followers API call and got the same 401 error