Using LinkedIn API and OAuth 2.0 authorisation with Meteor?

I’m wondering what approach people are using to interact with the LinkedIn API in Meteor?

There’s two Meteor packages that seem to be oriented towards using LinkedIn authentication with Meteor:

https://github.com/yefim/meteor-accounts-linkedin
(Discourse will only let me post two links per post - but you can find the second package mentioned in the README)

In terms of using the API, there is this:

However, from what I can tell, it doesn’t support using OAuth 2.0 to request permissions from another user, and query the API using authorised credentials.

What are some ways of going about this?

1 Like

I haven’t used the LinkedIn API, but I believe I’ve gone through the same thing with the Soundcloud API. I used a Soundcloud OAuth package to integrate login with accounts, but the API didn’t work properly through the package. So I ended up just doing HTTP requests straight to the REST API using the auth token stored in accounts.

I’m using the following packages which are a fork from yefim I think:

pauli:accounts-linkedin 1.1.1 Accounts service for LinkedIn accounts
pauli:linkedin 1.1.1 A OAuth2 wrapper for the LinkedIN API

Meteor.loginWithLinkedIn with no requestsPermissions set

ServiceConfiguration.configurations.insert({
service: “linkedin”,
clientId: “”,
secret: “”
});

I’ve managed to get LinkedIn working with:

jonperl:accounts-linkedin

However I’ve only been able to get BasicProfile data and never FullProfile data on a live server despite this working on localhost.

Did you have any success with the pauli:accounts-linkedin package?

I’m in the same situation. I’m trying to load the linkedIn profile of a user without logging him inside the app.
So using those 2 packages : pauli:accounts-linkedin & khamoud:linkedin-api, I’m doing the following :

LinkedIn.requestCredential(loadLinkedInProfile);
loadLinkedInProfile = function(tokenOrError){
	if(tokenOrError && tokenOrError instanceof Error){
		console.log(error);
	}
	else{
		var linkedin = Linkedin().init(tokenOrError);
		linkedin.people.me(function(err, $in) {
    		//Do whatever you want with the profile object $in
		});
	}
};