Goodreads Developers discussion
questions
>
Help debugging oauth issues
date
newest »


The response is a 401 with the message `Invalid OAuth Request` followed by a random length comment.
Interestingly, when I run the exact same code but give it the url `"https://www.goodreads.com/friend/requ..."` instead of "https://www.goodreads.com/api/auth_user" I get results
The headers are specifically this part:
{
Authorization: 'OAuth
oauth_consumer_key="***********",oauth_nonce="ScC0fuPhkARaZK1Bv8Oj33taSb7PZwy3",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1600964115",oauth_token="**************",oauth_version="1.0",oauth_signature="bD8CUV0j%2BhEuLGrqT%2BHYdAnZizQ%3D"',
Host: 'www.goodreads.com',
Accept: '*/*',
Connection: 'close',
'User-Agent': 'Node authentication',
'Content-length': 0,
'Content-Type': 'application/x-www-form-urlencoded'
}
Whenever I make a request to /api/auth_user I get an invalid oauth error. Is there a way to debug this and get more useful error messages? Right now i am at a bit of a loss. Any help would be appreciated
I have verified that my signature is correct and besides that Im not sure what else is to check.
Here is the options I am sending
{
port: 443,
hostname: 'www.goodreads.com',
method: 'GET',
path: '/api/auth_user',
headers: {
Authorization: 'OAuth oauth_consumer_key="***********",oauth_nonce="ScC0fuPhkARaZK1Bv8Oj33taSb7PZwy3",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1600964115",oauth_token="**************",oauth_version="1.0",oauth_signature="bD8CUV0j%2BhEuLGrqT%2BHYdAnZizQ%3D"',
Host: 'www.goodreads.com',
Accept: '*/*',
Connection: 'close',
'User-Agent': 'Node authentication',
'Content-length': 0,
'Content-Type': 'application/x-www-form-urlencoded'
}
}