JoseyWales
JoseyWales

Reputation: 33

LinkedIn API Suddenly Returning 405 Error

One of our apps that uses LinkedIn Login, and has been working fine for a long time, is now suddenly broken, as of yesterday. Most, but not all of our calls to the People endpoint return a 405 error. Did something change for that endpoint?

I'm making a GET, just as the documentation says, and I'm getting back "(405) Method Not Allowed." from LinkedIn. Here is the URL that I'm requesting:

https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,headline,industry,summary,specialties,associations,honors,skills,interests,educations,phone-numbers,main-address,picture-url,public-profile-url,following,positions,three-current-positions,location,site-standard-profile-request)

Any help or any links to recent LinkedIn API changes would be appreciated. I can't find any reference to any changes there in the last couple of days, but our app suddenly broke and we didn't change anything on our end. Anyone?

Upvotes: 3

Views: 1037

Answers (2)

ikerbarrena
ikerbarrena

Reputation: 11

We have solved this fix adding the request header "Expect" empty like this:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:') );

Upvotes: 1

Eilimint
Eilimint

Reputation: 307

LinkedIn made some unannounced changes yesterday which has broken their oAuth endpoint. They still haven't mentioned it of course.

You can see a workaround here: POST https://www.linkedin.com/uas/oauth2/accessToken HTTP/1.1 results in Method Not Found on LinkedIn

Upvotes: 3

Related Questions