通过LinkedIn V2 API检索UGC帖子时收到ClassCastException错误

Pan*_*kul 5 linkedin linkedin-api

我正在尝试通过调用以下API来检索UGC帖子列表

https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List%28urn%3Ali%3Aorganization%3A[ORG_ID]%29
Run Code Online (Sandbox Code Playgroud)

[ORG_ID]是我的组织的ID。然后我得到这个错误

{
    "serviceErrorCode": 0,
    "message": "java.lang.ClassCastException: java.lang.String cannot be cast to com.linkedin.data.DataComplex",
    "status": 500
}
Run Code Online (Sandbox Code Playgroud)

我已经被授权使用API​​ V2,并包含X-Restli-Protocol-Version:2.0.0在标题中。

vij*_*kar 1

我也遇到了这个问题,查询参数上的括号authors不应该被编码。

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