简体   繁体   English

Linkedin Share API 403 访问被拒绝

[英]Linkedin Share API 403 Access Denied

While trying to use LinkedIn share API, I have successfully created an application and given all permissions to that application, eg, r_basicprofile , r_emailaddress , rw_company_admin , w_share .在尝试使用 LinkedIn 共享 API 时,我成功创建了一个应用程序并授予该应用程序的所有权限,例如r_basicprofiler_emailaddressrw_company_adminw_share

My body content is as follows -我的正文内容如下-

{
"content": {
           "title": "The title",
           "description": "the description",
           "submittedUrl": "GAVE_MY_URL",
           "submittedImageUrl": "GAVE_My_IMAGE_URL"
           },
           "comment": "demo comment",
           "visibility": {
                         "code": "anyone"
                         }
}

My header was -我的标题是 -

Content-Type: application/json 
x-li-format: json 
Authorization: Bearer GAVE_MY_ACCESS_TOKEN 

Every time I do a request, I get the following response -每次我提出请求时,我都会得到以下响应-

{ 
    "errorCode": 0, 
    "message": "Access to posting shares denied",         
    "requestId": "GZTBG1IZ2L", 
    "status": 403, 
    "timestamp": 1478159135348 
} 

NB: I have tried POSTMAN and PHP cURL.注意:我尝试过 POSTMAN 和 PHP cURL。

Could anyone please help me....Thanks in advance.任何人都可以帮助我.... 提前致谢。

You can use:您可以使用:

" https://api.linkedin.com/v1/companies/ ".$company_id."/shares?format=json&oauth2_access_token=".GAVE_MY_ACCESS_TOKEN " https://api.linkedin.com/v1/companies/ ".$company_id."/shares?format=json&oauth2_access_token=".GAVE_MY_ACCESS_TOKEN

without Authorization in your header.在您的标题中没有授权。

This happens to me too, and after exploring many things and spending many hours, I fixed this, actually I was not including the port number into to "Redirect URLs".这也发生在我身上,在探索了很多事情并花了很多时间之后,我解决了这个问题,实际上我没有将端口号包含到“重定向 URL”中。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM