Search code examples
javascriptlinkedin-apilinkedin-jsapi

Getting "JavaScript API domain is restricted to..." error after adding domain to LinkedIn Javascript API domain list


In the past I have added domains to the Javascript API Domains list for my LinkedIn app and had those domains work with the app without issue. However, I added another domain a couple of days ago and I still get the following error

JavaScript API Domain is restricted to localhost, first.domain.com, second.domain.com,.....

The error message does not contain the new domain I added. This is confusing because I can see the newly added site in the Javascript API domains list in the administration console for the LinkedIn app.

enter image description here

Is there anything I'm missing or has something changed with the API regarding this?


Solution

  • What was happening is that we were adding the new domain to the Authentication list (in the Authentication tab of the settings page) instead of the JavaScript list. Adding the new domain to the Valid SDK Domains list in the Javascript Settings tab worked as expected.

    LinkedIn App Settings page