簡體   English   中英

如何獲取 V2 api 的 Linkedin 人員 ID?

[英]how to get Linkedin person id for V2 api?

我正在嘗試通過 Linkedin V2 API 在我的 LinkedIn 個人資料上發帖。 它不斷返回錯誤

請求錯誤:com.linkedin.publishing.util.common.ResponseException:person 類型的作者無權修改 UserGeneratedContent..

也許這是因為我沒有發送我的 LinkedIn 個人 ID。

$author = array(
            'author' => 'urn:li:person:XXXXXXXX',
        );

如何找到我的linkedin 個人資料的個人 ID?

您可以使用Profile API檢索當前會員的 Profile 在有關人員 ID 的部分中

響應中返回的id是用戶的唯一標識

您還可以使用字段投影來僅檢索id字段,例如:

curl -H "Authorization: Bearer <token>" \
"https://api.linkedin.com/v2/me?projection=(id)"

將返回:

{
  "id": "yrZCpj2Z12"
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM