简体   繁体   中英

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 .

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.

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

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".

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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