Forum Discussion
CORS error occuring after accessing linkedin share api through modern script on SharePoint Online
nilesh1011 Are you accessing it using spHttpClient in the page context to access the API? https://docs.microsoft.com/en-us/javascript/api/sp-http/sphttpclient?view=sp-typescript-latest
Toby Statham I am accessing linkedIn share api through jquery Ajax method in sharePoint online modern script editor.
- Toby StathamAug 05, 2019Brass Contributor
Not sure exactly what you're trying to do, but this doesn't look like the correct way to access the LinkedIn APIs. Where did you get this example from?
Here is the developer documentation for LinkedIn - https://docs.microsoft.com/en-us/linkedin/consumer/
- nilesh1011Aug 06, 2019Copper Contributor
We are using the webpart with No Javascript language now. When we are trying to connect the Share web api of the LinkedIn. It is giving the CORS error. I'm also attached the No Javascript typescript file for you info. API call is in the LoadData() function.
Kindly provide the help asap.
- Toby StathamAug 06, 2019Brass Contributor
nilesh1011 Have you added the tenant URL as an SDK in your LinkedIn application as detailed here - https://developer.linkedin.com/docs/getting-started-js-sdk