linkedin companies api throws error code 500 for company without logo

While getting list of companies for a user it throws 500 error code for the company which does not have a logo.

Query with logo-url param:

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 }

Query without logo-url param:

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 to resolve this?

Upvotes: 9

Views: 259

Answers (1)

Abhishek Ramachandran
Abhishek Ramachandran

Reputation: 1170

I found this as an issue from LinkedIn. This happens if the requested company doesn't have a logo. I tried adding a new logo and the API works with logo-url in request.

Upvotes: 0

Related Questions