Retrieve UGC Posts through LinkedIn V2 API got ClassCastException error

纵饮孤独 提交于 2019-12-05 09:19:43

I was having issues with this too, the parens on the authors query param shouldn't be encoded.

I.e., try: https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List(urn%3Ali%3Aorganization%3A[ORG_ID])

I tested it with the URL mentioned https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List(urn%3Ali%3Aorganization%3A[ORGANISATION ID]) and it works but make sure you set the header. X-Restli-Protocol-Version: 2.0.0

I had to do this manually however since postman apparently doesn't work and perhaps other http tools are having similar issues. https://github.com/postmanlabs/postman-app-support/issues/5752

The error returned by postman is the following or if you forget to include the header above: {"serviceErrorCode":0,"message":"java.lang.ClassCastException","status":500}

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