Company Linkedin api throws 500 error code for company without logo

Upon receipt of the list of companies for the user, he gives a 500 error code for a company that does not have a logo.

A request with the logo-url parameter:

curl " https://api.linkedin.com/v1/companies:(id,name,universal-name,website-url,industries,status,blog-rss-url,logo-url,twitter-id,employee-count -range, specialties, locations, description, stock-exchange, founded-year, end-year, num-followers)? is-company-admin = true & format = json & count = 1 & start = 2 & oauth2_access_token = XXXX

{"errorCode": 0, "message": "Internal API Server Error",
"requestId": "xyz", "status": 500, "timestamp": 1522908224279}

Request without logo-url parameter:

curl " https://api.linkedin.com/v1/companies:(id,name,universal-name,website-url,industries,status,blog-rss-url,twitter-id,employee-count-range,specialties , locations, description, stock-exchange, founded-year, end-year, num-followers)? is-company-admin = true & format = json & count = 1 & start = 2 & oauth2_access_token = XXXX

{"_count": 1, "_start": 2, "_total": 8, "values": [{"id": 123456, "name": "Cross Talk", "numFollowers": 0, "universalName": "cross-talk"}]}

Can anyone help resolve this?

+5
source share
1 answer

I found this as a problem from Twitter. This happens if the requested company does not have a logo. I tried to add a new logo, and the API works with logo-url in the request.

0
source

Source: https://habr.com/ru/post/1276261/


All Articles