Goodreads Developers discussion

36 views
bugs > auth_user not working with PHP

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

message 1: by M (new)

M J (mehj) | 2 comments After successfully getting the OAuth token and secret using this library:
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.


message 2: by M (new)

M J (mehj) | 2 comments Just bumping this.


message 3: by Protestthegiu (last edited May 17, 2020 11:06AM) (new)

Protestthegiu | 1 comments Sorry that this reply may not be super useful to you as you're writing in PHP, but if someone else comes across this and is using Node.js, this wrapper library works: https://github.com/baahrens/goodreads...

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.


back to top