Search code examples
web-servicesrestlinkedin-api

How to log the user out when using Linkedin's REST API?


Surprisingly, I can't find the REST endpoint to log the user out of my Linkedin-connected app.

It's mentioned in the JavaScript API (https://developer.linkedin.com/docs/js-sdk, § "Log the user out"), but nowhere to be found on https://developer.linkedin.com/docs/oauth2.


Solution

  • After searching around, I found this StackOverflow answer, which seems to indicate that it is not possible to log a user out via a REST endpoint. The answer references a link on the LinkedIn developer site which has since broken, but the quote on the answer states:

    Third party applications do not have any way to log a user out from LinkedIn - this is controlled by the website. Invalidating the token makes the user re-authorize the next time they try to use the application, but once they have logged into LinkedIn their browser will remain logged in until they log out via the website.