Reputation: 1811
I'm using linkedin-oauth2 gem to connect with LinkedIn Api. The following snippet gives me 403 error:
client = LinkedIn::API.new(user_access_token)
client.profile # works well
client.network_updates # gives 403 error
I gave all possible permissions to the app (including rw_nus). Any ideas?
Upvotes: 1
Views: 324
Reputation: 51
Check the permission because linkedin api is changed go through the url for more info http://www.oodlestechnologies.com/blogs/recent-changes-in-linkedin-api
Upvotes: 1
Reputation: 2683
You are getting probably this issue because you are not setting properly the scope for the omniauth gem to request this permissions on the client-side oauth2 besides how the app permissions are configured in the Linkedin developer network site.
Try addind something like
:scope => 'r_fullprofile r_contactinfo r_emailaddress r_network'
to the existing config line you might have in the Omniauth (or Devise) initializer file.
provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET']
Then you should get both Apps working good.
Upvotes: 1
Reputation: 1811
I think it's a problem on LinkedIn side connected with cache. Adding permissions to the existing app doesn't work but creating app with needed permissions gives exactly what i want.
Upvotes: 0