LinkedIn API Refresh Access Token (May 2017)
Asked Answered
M

1

14

Could someone please clarify whether it's possible to refresh a LinkedIn access token programatically WITHOUT requiring any user interaction?

https://developer.linkedin.com/support/faq

...Refreshing an access token can be done silently behind-the-scenes and should have no impact on user experience.

...If your application requires you to make API calls in an automated way - without user interaction, you need to bootstrap the first access token request by manually signing in, and then ensure that your application refreshes the token automatically prior to expiry to avoid the need for additional human authentication.

Their documentation points to 'Step 5 — Refresh your Access Tokens' https://developer.linkedin.com/docs/oauth2#refresh

During the refresh workflow, provided the following conditions are met, the authorization dialog portion of the flow is automatically skipped and the user is redirected back to your callback URL, making acquiring a refreshed access token a seamless behind-the-scenes user experience:

The user is still logged into www.linkedin.com

The user's current access token has not expired

As clear as mud...but from the above it sounds like their "silent" refresh still requires the user to have an active session/logged in to LinkedIn.

Thank you!

Melioration answered 19/5, 2017 at 10:28 Comment(1)
Hi Michael, obviously this question is quite old, but did you ever find a method to refresh the token progmatically?Ludvig
H
0

Looks like you need to ask them to enable Credentials Flow so you can pass the client ID and client secret directly. I'm in the same boat, really frustrating.

"Commonly referred to as "OAuth two-legged", this flow allows your application to authorize with LinkedIn's API directly - outside the context of any specific user."

https://developer.linkedin.com/docs/v2/oauth2-client-credentials-flow

Hatching answered 21/8, 2018 at 7:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.