In v1.0, We can able to get public profile url using below api.
https://api.linkedin.com/v1/people/~:(id,public-profile-url,first-name,last-name,email-address)?format=json
but in v2.0, when i try to get r_basicprofile its gives me Erro 403 (You dont have get /me permission), However i can get id, first name, last name using r_liteprofile.
https://api.linkedin.com/v2/me
How can i get public-profile-url or vanityName?
Thanks!
HTTP API exampleSet LINKEDIN_API_KEY and LINKEDIN_API_SECRET, configure your app to redirect to http://localhost:8080/code, then execute: http_api.py. Visit http://localhost:8080 in your browser, curl or similar. A tab in your browser will open up, give LinkedIn permission there.
Unfortunately, you can't get the vanityName
easily in v2, unless you apply for partnership program (as what KPSingh suggested) but LinkedIn discourages you to apply the partnership if you only want to get the vanityName
.
https://learn.microsoft.com/en-us/linkedin/shared/integrations/people/profile-api-v1-migration
Please do not apply to a partner program like the Marketing Developer Platform if you are seeking access to member profile data that is not made available via the new “Lite Profile” permission. Access to partner programs is appropriate for select use cases only, and all other requests for access will be rejected.
Also, in v2 r_basicprofile
was replaced with r_liteprofile
permission.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With