I'm currently making a LinkedIn app using the LinkedIn OAuth 2.0 Developer API with permissions r_liteprofile & r_emailaddress (Products added to my app include Share on LinkedIn & Sign In with LinkedIn).
Recently the profile images retrieved with this GET API (as per LinkedIn's own Developer documentation):
https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,localizedFirstName,localizedLastName,profilePicture(displayImage~:playableStreams))
Have started to return either 403 - Forbidden.
Full error message:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>403 - Forbidden</title>
</head>
<body>
<h1>403 - Forbidden</h1>
</body>
</html>
OR
The error Access Denied e.g.
Access Denied
You don't have permission to access "http://media-exp1.licdn.com/dms/image/C4E03AQHE3A16fLv1kQ/profile-displayphoto-shrink_800_800/0?" on this server.
Reference #18.2e5c7a5c.1589838983.25cfca02
This URL gives me Access Denied when not using a VPN, and 403 - Forbidden when using a VPN.
This tells me my IP address is being logged and some security mechanism kicking in if I access the URL directly a few times.
However about two months ago, I could directly link to this profile image URL from my app and it would load just fine.
If LinkedIn has made some changes and I can no longer link to the profile image URL - how else can I access the user's profile image?
Any help you can provide would be much appreciated!