I tried to share a html page on linkedin using the Javascript API and the following format. I didn't need any image, so I left it blank.
{
"comment": "Check out developer.linkedin.com!",
"content": {
"title": "LinkedIn Developers Resources",
"description": "Leverage LinkedIn's APIs to maximize engagement",
"submitted-url": "https://developer.linkedin.com"
},
"visibility": {
"code": "anyone"
}
}
I get an error [unauthorized]. IP Address Mismatch from the API, when I change the "submitted-url" to my html page. The code works fine when I try to share a linkedin url, the one given in the example above.
I found the answer. The share url should be a publicly accessible url.
My url was "local.mpr.com" which I had configured using my IIS. So, the question is, can't I test the linkedin api unless I share a url that is available in the public domain.