Goodreads Developers discussion

24 views
questions > Api returning name not ID

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

message 1: by Connor (new)

Connor McCarthy (connormccarthy) | 1 comments I have a oAuth request working using php successfully but when I read the results of auth_user only the name is returned and not the numerical userID which is seemingly used a lot during the other calls.

How can I get this userID when the user Authorises the app?


message 2: by Gunther (new)

Gunther Wils | 7 comments you should get the id and name from the user back from that endpoint
the id is in the id attribute of the user element

for example my response looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<GoodreadsResponse>
<Request>
<authentication>true</authentication>
<key>
<![CDATA[xxxxxxxxxxxxxx]]>
</key>
<method>
<![CDATA[api_auth_user]]>
</method>
</Request>
<user id="28249489">
<name>Gunther Wils</name>
<link>
<![CDATA[https://www.goodreads.com/user/show/2...
</link>
</user>
</GoodreadsResponse>


with this being the id

<user id="28249489">



back to top