Linkedin.getAuthenticationToken()

Obtains the authentication token after you complete the url login phase. Make sure to do this within 20 seconds or else the code expires.

Usage

Hover over inputs/exits for more info.

var Linkedin = require('machinepack-linkedin');


// Obtains the authentication token after you complete the url login phase. Make sure to do this within 20 seconds or else the code expires.

Linkedin.getAuthenticationToken({

code: '1234435',

redirect_url: 'https://localhost/url',

client_id: '12345678',

client_secret: '234643dadfe',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

code required

Code received from the get-login-url

'1234435'
redirect_url required

Url used to redirect users once they finish using the link.

'https://localhost/url'
client_id required

API key that is given to you when you register your application.

'12345678'
client_secret required

Secret code for your LinkedIN application.

'234643dadfe'

Exits

error

An unexpected error occurred.

success

OK.