Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinkedIn mobile access token for making server side REST API calls

As per LinkedIn documentation I see that we cannot use the mobile access token to make REST API calls which LinkedIn provides. I have a use case, where, in my mobile app, I use LinkedIn's mobile SDK for logging in to linkedin and I need to fetch certain data like logged in user's connections etc on the backend. This should ideally be done on backend instead of mobile because I do not want too many calls going from app to our servers. Is there any work around to do this?

like image 950
coder Avatar asked Apr 19 '15 09:04

coder


People also ask

How do I call API access token?

The other way to make an API call with an access token is to add it to the request header. If using curl (a command line program that can be used for running API requests) you would specify the access token like this. Notice that the access_token is not in the URL at all. See the example on the API documentation site.

What is access token in REST API?

Access tokens are used in token-based authentication to allow an application to access an API. The application receives an access token after a user successfully authenticates and authorizes access, then passes the access token as a credential when it calls the target API.


1 Answers

Actually, there is a way to do requests from backend to linkedin via mobile SDK token.

Such configuration worked for me:


GET https://api.linkedin.com/v1/people/~?format=json
Headers:
Authorization = Bearer ${token}
x-li-src = msdk
like image 150
nazlo Avatar answered Oct 22 '22 13:10

nazlo