Closed dbeja closed 6 years ago
Unfortunately no! You need to access_token
instead of authorization code
in order to call any endpoint.
I found a way to make it work but couldn't find any documentation to support that, only some lost comments on the web.
Instead of adding an Authorization Bearer header, I use instead a oauth_token header with the token I get on frontend from IN.ENV.auth.oauth_token.
In that case, you may send me a pull request and I'll add that feature! would be awesome to have it supported :)
I was about to do that but I noticed that already exists on the code :) Basically this option is when you choose oauth version 1.
If I initialize with these options I think it will work:
var linkedin = Linkedin.init({
token: JS_TOKEN,
type: 'server',
version: 1
});
Hi,
On the frontend I'm using Linkedin Javascript SDK to login the user in my application:
IN.User.authorize(function(response)
{ ..... });Then I send the oauth_token that is on IN.ENV.auth.oauth_token to my nodejs service.
On my nodejs service I'm trying to use node-linkedin to get details about the user:
But I always get "Invalid access token." error.
Am I doing something wrong? Can't I use this oauth_token to authorize my linkedin api calls?