Avoid CHALLENGE Url from LinkedIn Voyager API when using Google Cloud Run

32 views Asked by At

Context

For a University term project, I want users to be able to pass in a url to their Linkedin profile and then have my application retrieve all the data on their profile which is then used later in my application. I need more information than what the official LinkedIn API provides (name, email, headline, photo). My application requires information about a user's education and experiences. I am using the linkedin URLs because it is a better experience than having users copy this information over when they likely already have a perfectly good LinkedIn profile.

The Problem

I found this wonderful unnoficial API for Linkedin which I used in my application: Repo. The client works great for my use case locally. However, I am hosting the application using Google Cloud Provider (a requirement for the course I am in). When running the unnoficial Python Linkedin API client in a Google Cloud Run container, I face the dreaded CHALLENGE URL which is documented by the library here: Challenge Urls. I suspect that I am recieving these challenge URLs because the IP of the container seems very sketchy to the linkedin API when I attempt to login with my credentials.

How You Can Help

What strategies can I use to make the requests from the Google Cloud Container work like they do locally for me? Is there a way to make the IP address not trigger a CHALLENGE url from the Linkedin API? Or is there a better FREE way I could be approaching this problem in the context of my project? I see that there are other paid solutions like Prospeo and Proxycurl but I need something less heavy duty and FREE since this is just a hobby project for a Univeristy class.

I have already tried the basic troubleshooting tips for CHALLENGE URLs on the repo page. Logging in and out from the browser or even changing the password provided no resolution. I have pinpointed the issue to be stemming from way the Google Cloud Run Container is making requests. My laptop locally is not faced with CHALLENGE URLs and I even tested it on a classmates Laptop and they also do not recieve any CHALLENGE URLs. There was an unresolved thread on the repository as well so this is definitely a problem for other users as well: Issue.

Thanks for taking a look. The code is not super relevant so I chose not to include my application's backend code at this time.

0

There are 0 answers