0

I am trying to get LinkedIn User Access token using linkedin-j-android library. I am able to get a Valid auth token (60 days validity) and secret.

I am able to fetch all the user details using that auth token in the android device but when I am passing the same auth token to the web server and there I am using the same auth token to fetch the same user details, I am getting Invalid access token response.

The same token is working in Android device but on server It is not working. On the server, I am using same API keys and Secret of the LinkedIn App which I have used in Android device.

Jambaaz
  • 2,788
  • 1
  • 19
  • 30

2 Answers2

1

I been able to generate an auth token which works over Mobile and Web simultaneously .

refer https://github.com/Hafiz-Waleed-Hussain/EasyLinkedInAndroid

Jambaaz
  • 2,788
  • 1
  • 19
  • 30
0

According to me auth-token generated on device can't work on your server. You have to generate different auth-token there to maintain session. Auth token can be used only on single device at a time. You can't pass it to different devices.

You can get more details about it here

http://docs.oracle.com/cd/E19728-01/820-2550/authtoken_auth.html

Vaibhav Agarwal
  • 4,499
  • 3
  • 19
  • 20
  • It is working on another android device too, I have already checked. – Jambaaz Dec 13 '13 at 11:25
  • On android device you are creating your auth token with key and secret so it is working there but passing it to different platform won't work. – Vaibhav Agarwal Dec 13 '13 at 11:27
  • Thanks @Vaibhav. So, You mean If I pass key and secret to the server, still It would not work or there also, I can generate the same auth token ? – Jambaaz Dec 13 '13 at 11:30
  • You can pass key and secret to server and with the help of these keys you have to generate auth token over server side to access services and other API of LinkedIn – Vaibhav Agarwal Dec 13 '13 at 11:34
  • Yes, You are right, I been able to generate auth token using keys and secret using linkedin-j library but auth token is only valid to one platform. – Jambaaz Dec 13 '13 at 11:45
  • Surprisingly, The same mechanism works in facebook, there I can just pass the token and It is valid on other platforms too. – Jambaaz Dec 13 '13 at 12:19
  • Really!! Let me check first and i will revert to you with more suitable answer. – Vaibhav Agarwal Dec 13 '13 at 12:35
  • I been able to generate same auth token which works over Mobile and Web simultaneously . refer https://github.com/Hafiz-Waleed-Hussain/EasyLinkedInAndroid – Jambaaz Dec 24 '13 at 09:34