Get user positions from LinkedIn API - linkedin

I am trying to get the user positions and picture url when he logs in. I have permission of r_basicprofile enabled on my app and included on the scopes.
Using the url:
https://api.linkedin.com/v2/people/(id:<userID>)?oauth2_access_token=<AccesToken>&projection=(id,firstName,lastName,positions,picture-url)
I get the first name, last name, and ID, but nothing else. What is missing? Thanks in advance.

You need the r_fullprofile permission according to the documentation: https://learn.microsoft.com/en-us/linkedin/shared/references/v2/profile/full-profile?context=linkedin%2Fconsumer%2Fcontext

Related

LinkedIn access to Basic Profile

We have developed a signup via LinkedIn app.
We currently get the default “lite profile” but need access to the “basic profile”
We’ve tried reaching out to all parts of LinkedIn but to no avail.
The links to the Partner Program Page also seem deprecated.
Can someone please share how we can get the upgraded permissions pls?
To access any of the basic profile fields, your application must request the r_basicprofile member permission. Check out the field names here
To access email address your application must request the r_emailaddress member permission with field name email-address

How to get location_info (country name) in Auth0 User logs using management api?

I am using c# app and fetching user logs from auth0 management api v2 using "/api/v2/logs?q=". The logs contains lot of information but I can't find country name(from where the user login) in the logs. I can see location_info property in official docs https://auth0.com/docs/api/management/v2#!/Logs/get_logs but I am not sure how to use it. Do I need to send any query param like "q=location_info=true" something like this or is there any other way?
Ok, so I found the answer. Actually it was a silly mistake that was blocking location_info in the response. I was calling this url "/api/v2/logs?q=userId:{user_id}" which returns dashboard logs. Instead I needed only user logs that can be seen in user's profile in Auth0. For that I needed to hit this url "/api/v2/users/{user_id}/logs". Once I hit this url I got location_info (country name, country code, city name etc) object in response.

How can I find a different user profile using the LinkedIn API

What I want to do is use the LinkedIn API to access a arbitrary user profile, get the image (if there is a public one) and use that image. If a user is authenticated, I can get their image using:
https://api.linkedin.com/v1/people/~:(picture-url)?format=json
But I cannot figure out what to replace the tilda (~) with to find an arbitrary user (i.e. using an email address). If I simply put in the email address, it won't find the user.
Is it possible to get info from an arbitrary user profile (assuming that it is public)?
Thanks,
Scott
It is not possible getting an arbitrary user informations by using LinkedIn API. The user must authenticate the application by his or her username and password.
However, this answer gives a working example how to access a profile by url. I suppose that adding picture-url will work.

Derive LinkedIn profile URL from user ID?

Is it possible to derive a linkedin profile url (public OR private) from the user ID?
You can use the ID in this URL and this will give you the link to User Profile http://www.linkedin.com/profile/view?id=YourID
UPDATE: Apparently, this solution no longer works.
You need to get r_basicprofile permissions from the user, then grab the public-profile-url field from the response.
read more at https://developer.linkedin.com/docs/fields/basic-profile
I guess some things have changed in the LinkedIn API over the years.
This is the solution that worked for me:
http://www.linkedin.com/in/USERNAME
Used it as a href in my website to link to user's LinkedIn profile page and it works fine.

How to work with Aweber API

I am using first time Aweber.I am stuck at some point when I used Aweber API.Below are steps to explain my issue:
I created an account on Aweber labs and created application there. I also retrieved
Consumer Key , Application Id and Consumer Secret from there and put in my demo.php .
When I run this file I had a form with login/password:
Please see this below url :
https://auth.aweber.com/1.0/oauth/authorize?oauth_token=Aq2I3AD7yh7wKBGMGs2pALaP
Now my question is which account's user/pass need to write here. I tried with Aweber lab account details which showing "Notice: Invalid credentials - please retry".
Should I go there "https://www.aweber.com/order.htm" and create paid account to fill there.
Please give your suggestions asap.
With Regards
The AWeber docs are mindbogglingly poor. I don't even understand why they have an API: your app and your keys have nothing to do with accessing any user's data. They just prove to AWeber that yes, you are a developer.... but so what? You want to access USER data (e.g. their lists and subscribers), and that requires a paid account that you can access. From everything I can tell, the AWeber API merely lets you recreate the standard login form from https://www.aweber.com/login.htm on your site.
If you can add the oAuth tokens to your code, that would allow you to retrieve data for a given user, but I don't see any examples in the docs of how to do that, or any explanations that "oh yeah, by the way, AWeber handles this completely differently than any other email company out there." So good luck.
You need to log in with your Aweber credentials, not your lab credentials. Also, when you receive your tokens, add them to your code or everyone visiting your form/app will be redirected to that screen because it will be checking for the cookies that Oauth sets and they won't exist.
EDIT: So to be clear,
You need to set the Oauth cookie yourself first via code in your script
You need to execute the code so the cookies get set in your browser
Then you need to look at the values of the cookies to get your accessKey and accessSecret
Then you need to hard code those values into your script:
$account = $aweber->getAccount($accessKey, $accessSecret);
Lastly, do not forget to remove the Ouath cookie setting in your script
In the demo code provided by aweber just after this line:
$account = $aweber->getAccount($_COOKIE['accessToken'],
$_COOKIE['accessTokenSecret']);
you will be able to get account id
$account_id = $account->id;
This will give you the account id of the logged-in user.
This PHP tutorial should make the integration pretty painless:
http://engineering.aweber.com/quick-start-api-script-in-php/

Resources