0

I'm using OAuth.io to authenticate and get the feeds of a number of services, most are working well but I'm having problems with the LinkedIn feed.

I have the service's oauth tokens stored server side so I create the OAuth object with the prior authenticated tokens and call the feed url from there:

  tokens = { oauth_token: 'abcd', oauth_token_secret: 'efgh' }
  serviceRequestor = OAuth.create('linkedin', tokens)

  if(serviceRequestor){
    serviceRequestor.get('/v1/people/~/network/updates')
  }

Running the above code gives me a 403 Forbidden response from LinkedIn. However if I run:

if(serviceRequestor){
  serviceRequestor.get('/v1/people/~')
}

I get a clean response with the appropriate details. I have all the permissions switched on in the LinkedIn App Settings to get the users feed etc.

Is there something I'm missing in my code or setup or is this something to do with OAuth.io or LinkedIn?

Thanks very much for your help in advance.

chrisgooley
  • 774
  • 1
  • 7
  • 16

1 Answers1

0

The scope (permission) r_network has to be accepted by the user to access the endpoint /v1/people/~/network/updates. With Linkedin OAuth1 (provider linkedin in oauth.io), this permission can be configured in the Linkedin app settings. For Linkedin OAuth2 (provider linkedin2 in oauth.io), this permission can be added in your OAuth.io dashboard.

Thibaud Arnault
  • 1,435
  • 14
  • 21
  • thanks for the response. I didn't have the linkedin2 app added, which I've now done. I've added the r_network permission into the scope (along with a number of others along with the api keys. I can authenticate but I am still getting the same error. I can still access serviceRequestor.get('/v1/people/~') but not serviceRequestor.get('/v1/people/~/network/updates') – chrisgooley Jan 27 '15 at 01:06