5
votes

In the documentation I have read: "Now you can invalidate an OAuth token for your application. Just send an OAuth signed GET request to https://api.linkedin.com/uas/oauth/invalidateToken"

When I try it (LinkedIn REST API Console or C# WebRequest), It sends me Bad request (400). It can be that is an old method when LinkedIn authentication process is OAuth1.

How can I invalidate/revoke access token in LinkedIn api with OAuth2 authorization?

Thanks in advance!

1
Did you ever receive an answer for this? I'm looking to invalidate tokens.dimiguel
Sorry, but no :(Spuriga
link >The easiest thing to do is just to delete the Access Token from your storage. This way you no longer have access to that account. When LinkedIn was using OAuth 1.0a, they had an Invalidate call which would invalidate the Access Token. But when they moved to OAuth 2.0, that went away.mihir

1 Answers

0
votes

Since previous APIs will be deprecated(if not already) and V2 will be the one in usage, I have the way to revoke token on that API:

curl --request POST \
  --url https://www.linkedin.com/oauth/v2/revoke \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data client_id=CLIENT_ID_HERE \
  --data client_secret=CLIENT_SECRET_HERE \
  --data token=YOUR_TOKEN_HERE