LinkedIn OAuth Exception Scope NOT_AUTHORIZED r_fullprofile
Asked Answered
I

2

11

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

enter image description here

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 ?

Ingaingaberg answered 13/5, 2015 at 9:58 Comment(0)
C
6

Starting from May 12, 2015, Linkedin has limited the open APIs.

Access to r_fullprofile scopes requires that you apply for and are granted access to this information from LinkedIn. The full profile fields are only available to applications that have applied and been approved for the Apply with LinkedIn use case.

SOLUTION:

Apply for partner status with LinkedIn, explaining what your integration is and how it works. If it meets the criteria of "we feel that they’re providing value to members, developers and LinkedIn," then some or all of the restricted endpoints will remain open for that app, and ONLY that app.

Member profile fields

The following selection of profile fields are available to all LinkedIn developers:

  1. Basic Profile Fields
  2. Location Fields
  3. Position Fields

Member profile fields available to Apply with LinkedIn developers:

The following selection of profile fields are only available to applications that have applied and been approved for the Apply with LinkedIn use case:

  1. Full Profile Fields
  2. Contact Info Fields
  3. Company Fields
  4. Publication Fields
  5. Patent Fields
  6. Language Fields
  7. Skill Fields
  8. Certification Fields
  9. Course Fields
  10. Education Fields
  11. Volunteer Fields

Check out this linkedin page for more details on which fields are available to all the developers and which are not.

Contaminant answered 18/6, 2015 at 18:4 Comment(0)
A
3

I tried this https://api.linkedin.com/v1/people/~:(id,first-name,skills,educations,languages,twitter-accounts)?format=json at https://apigee.com/console/linkedin.

It is giving skills at apigee, but here https://developer.linkedin.com/docs/fields , Skills are something you would need to be approved by Linkedin.

Abubekr answered 13/5, 2015 at 10:8 Comment(3)
It works with OAuth 2.0. But am trying to authorize with /uas/oauth/requestToken. Which is OAuth1a.Ingaingaberg
I thing I have found my answer. https://mcmap.net/q/855768/-accessing-r_fullprofile-after-new-linkedin-api-policy-changes r_fullprofile can be requested but with 'Apply-with-linkedIn' strategy.Ingaingaberg
@swap.nil , Heres the Link for Apply with Linked if you need it linkAbubekr

© 2022 - 2024 — McMap. All rights reserved.