How can I verify a LinkedIn access token?

2019-02-05 07:18发布

问题:

How can I verify a LinkedIn access token?

I need to check if an access token is valid or not?

ex: in Facebook

https://graph.facebook.com/me?access_token=access_token

Is there a similar way to do it in LinkedIn?

回答1:

I found that it can be done like this:

https://api.linkedin.com/v1/people/~?oauth2_access_token=YOUR-ACCESS-TOKEN

and that's it :).



回答2:

Additionally, you can filter the values:

https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,picture-url,location,industry,current-share,num-connections,summary,specialties,positions)?format=json&oauth2_access_token={0}