本文介绍了LinkedIn API-服务器500错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用LinkedIn连接API返回用户的连接列表.一个特定的用户有2000多个连接,我们必须使用分页来返回超过500个的连接.

We are using the LinkedIn connections API to return a list of connections for a user. A specific user has over 2000 connections and we there have to use paging to return connections past 500.

在我的寻呼为start = 800 count = 500的第三个呼叫中,我们现在收到HTTP 500错误

On the third call where my paging is start=800 count=500 we now get a HTTP 500 error

请求是:

https://api.linkedin.com/v1/people/~/connections:(id,first-name,last-name,formatted-name,public-profile-url,picture-url::(original),headline,industry)?oauth2_access_token=**token**&format=json&start=800&count=500

错误返回是:

{
 "errorCode": 0,
 "message": "Internal service error",
 "requestId": "2JBK4Q1PJV",
 "status": 500,
 "timestamp": 1424849048682
}

如果我将请求更改为页面中的上一个点(即,将start = 300设置为count = 500,则它可以正常工作.

If I change the request to the previous point in the page (i.e. set start=300 and count=500 it works.

这个问题仅在最近几天才开始,我已经检查了限制.在那之前它曾经工作过.

This issue has only started in the last few days and I have checked the throttling. It used to work before that.

推荐答案

我通过将每次请求的联系人数量从500减少到250,使它再次工作,并进行了多次回合,直到获得所有联系人为止. /p>

I got it working again by reducing the number of contacts I am requesting each time from 500 to 250, and do multiple rounds until I get all the contacts.

https://api.linkedin.com/v1/people/~/connections:(public-profile-url)?start=0&count=250&modified=updated

这篇关于LinkedIn API-服务器500错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 13:28