HTTP 500 response using v1 linkedin companies shares api

孤街浪徒 提交于 2019-12-03 22:12:46

问题


It's been 2 days that trying to post content through LinkedIn API for a specific company page is failing with "Internal service error". Strangely, it only happens to this specific company page (id: 10684715) not any other company pages we post to! the code is in php. I have checked the company page to see if there is any information that helps and could find nothing. Also, posting the same content directly to LinkedIn works but not through API. Same code and similar requests worked previously. Moreover, sharing same content to another company page works! but not on this specific company page! anyone has any idea why?

endpoint:

https://api.linkedin.com/v1/companies/10684715/shares

header:

Connection: Keep-Alive,
x-li-format: json,
Authorization: Bearer ****,
Content-Type: application/json,
Content-Length: ****,

post data:

{
    "visibility": "anyone",
    "comment": "Your inner world is SO POWERFUL in creating the life that you desire. Awareness of your thoughts and emotions gives you the ability to change them to ones that serve your highest good. #Blisspot #Findyourblisspot
https://www.blisspot.com/albums/photo/view/album_id/220/photo_id/1204/type/creation_date/count/209/category_id/0/title/Recent+Photos/offset/1",
    "content": {
         "submitted-url": "https://www.blisspot.com/albums/photo/view/album_id/220/photo_id/1204/type/creation_date/count/209/category_id/0/title/Recent+Photos/offset/1",
         "title": "",
         "description": " "
    }
}

the response:

{
    "errorCode": 0,
    "message": "Internal service error",
    "requestId": "F6FH1FP3HI",
    "status": 500,
    "timestamp": 1516752029921
}

回答1:


This seems to be an intermittent issue with the #linkedin API v2. For the clients that are getting 500 errors, when you do page searches via the API those pages don't even exist apparently.

But, if you run the same search via v1 it comes up, and you can post using the v1 API.

What is strange is that it will suddenly start working again after a few days. Same calls, same tokens.

I have reached out to their developers for help, but they just reply to post here. Let's hope that they are catching and debugging these 500 errors.

But so far the changes in the v2 API are very welcome, apart from the 500 bugs




回答2:


If anyone still has this issue, after 3 days it got fixed itself. Apparently, it was due to an update on some pages on LinkedIn side and after a couple of days they fixed it.

UPDATE: The issue is fixed for the pages that had issue before .But, now it's happening to some other pages we're handling!!!



来源:https://stackoverflow.com/questions/48413350/http-500-response-using-v1-linkedin-companies-shares-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!