rsieiro/RSOAuthEngine — Issue #2: Issue with oAuth Signature (HMAC-SHA1) and LinkedIn REST API
Author: chiefy
Created: 2011-12-23 14:43:17+00:00
State: open

I am trying to hook this up to use with LinkedIn's REST API, and I am having some issues. I am getting a 401 - unauthorized for my requests to their API after succesfully going through the oAuth authentication. I was trying to figure out what was up and I found their oAuth tool thingee:

https://developer.linkedin.com/oauth-test-console

It lets you input your oAuth header information and it generates what it deems a "valid" HTTP Authentication Header. I compared the data that RSOAuth generates vs. this tool and noted that the oauth_signature param was the only difference. According to LinkedIn:
-------------
This page allows you to generate OAuth signatures using a known good OAuth library, OAuthSimple.
This way you can quickly identify if a 401 authentication error received from the LinkedIn API server is due to a bad signature or another issue.

To reproduce your API call, input all of the data from your original request, including the authentication tokens.
Don't forget to set the nonce and timestamp to the values you used.
An OAuth signed URL should match regardless of the generating library. If the signatures differ, you know there is a bug in your OAuth signature code.
-------------

So basically LinkedIn is saying that your signature code is all wrong :)

I am not so sure.

Anyhow, thanks for your work on this. I was hoping that I could hook this up so I could use Twitter / LinkedIn and Facebook API calls all with the same library thus reducing app size.