2

I am using Linkedin API v2 to post on my profile and on my company's page. The /accessToken route works fine, but all others (/me, /organizationalEntityAcls, /ugcPosts) give me the following error:

blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

However, I use all the headers listed in the API documentation, here is my code:

axios({
  url: "https://api.linkedin.com/v2/organizationalEntityAcls",
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "X-Restli-Protocol-Version": "2.0.0",
    Authorization: "Bearer " + access_token,
  },
  params: {
    q: "roleAssignee",
    role: "ADMINISTRATOR",
  },
})

Have you ever encountered this problem, and do you have a solution?

Thomas
  • 21
  • 1

0 Answers0