Goodreads Developers discussion
bugs
>
auth_user not working with PHP
date
newest »


I struggled with using an OAuth library myself for a day, getting the same "401 unauthorised" error and going through countless of these threads with no luck.
The issue was probably in the way I configured my OAuth request, or something else with getting and setting the access tokens. At least I can confirm the "auth_user" endpoint works, just try a different library if possible or dig into your OAuth requests.
https://github.com/dpoposki/goodreads
I've been trying for several hours to get the user ID using auth_user, to no success.
Things I've tried:
- The library's getUserId() method
- Every single solution on several dozen threads in this group
I keep on getting a "`401 Unauthorized` response: Invalid OAuth Request" response no matter what I do.
This makes me conclude that the problem could well be on GR's side.
If you know how to get user id using PHP (given the OAuth token and secret), please post your code for it below.
Thanks.