ArkeologeN / node-linkedin

LinkedIn 2.0 wrapper in Node.js
MIT License
163 stars 79 forks source link

how to generate access token? #70

Closed ralyodio closed 6 years ago

ralyodio commented 7 years ago

I do not see access token anywhere in my linkedin developer apps settings.

I'm also not using express, I just want to make a few api calls for my app using my linkedin account (I do not need users to authenticate with linkedin). Is there a programmatic example given user/pass of the linkedin account? It is not a client side app so there is no browser oAuth happening.

I know Snoowrap for reddit managed to do this, perhaps you can look at how they did it.

sunlee-newyork commented 7 years ago

+1

ArkeologeN commented 7 years ago

Please share a link with me where LinkedIn supports user/password based authentication and I'll integrate it.

subatomicglue commented 7 years ago

My use case is totally serverside - no frontend, and no user log in. Just want to pull some data for a set of companies. But all the examples in the npm page seem to be setting up endpoints in express to serve some frontend, which just doesn't compute with my needs.

How do I get an access token in a non-interactive fashion from the given clientID and clientSecret from linkedin?

ArkeologeN commented 7 years ago

@subatomicglue It is not just about express or something, the problem, you need a callback handler to receive an access token. Whether it's an express, restify, hapi or any other framework, as far as I know when I wrote this wrapper 3 years ago, there was no headless way to get the access token.

You need to go through browser redirection, allow permissions, receive code, exchange code with an access token and use it for further calls.

Again, if there is a way to get access token by just providing username/password -- feel free to link me to the given documentation and I'll integrate the feature.