Everything worked well until today when I received an email from LinkedIn indicating some significant API changes. And subsequently I was seeing Exceptions while authenticating users via. LinkedIn.
Following is the exception from logs
OAuth::Problem (Scope NOT_AUTHORIZED : r_fullprofile):
oauth (0.4.7) lib/oauth/consumer.rb:178:in `request'
oauth (0.4.7) lib/oauth/consumer.rb:194:in `token_request'
oauth (0.4.7) lib/oauth/consumer.rb:136:in `get_request_token'
OAuth logic to get request token.
consumer = OAuth::Consumer.new(LINKED_IN_API_KEY, LINKED_IN_SECRET_KEY,
{
:site => "https://api.linkedin.com",
:scheme => :header,
:http_method => :post,
:request_token_path => "/uas/oauth/requestToken?scope=r_fullprofile",
:access_token_path => "/uas/oauth/accessToken",
:authorizeEmapath => "/uas/oauth/authorize"
})
### Exception occurs at this call.
request_token = consumer.get_request_token(:oauth_callback => callback_url)
Email from LinkedIn
My Analysis till now
If I change the scope to r_basicprofile
it works fine but then I don't get skills
info of the authenticated linkedin user.
What should be the additional changes I need to do to suffice the API change ?
/uas/oauth/requestToken
. Which is OAuth1a. – Ingaingaberg