I’m trying to find a way to remove a LinkedIn connection via Javascript using the connection ID. It’s not possible via the Connections API (https://developer.linkedin.com/documents/connections-api).
LinkedIn does it on its own site via a form. Is there a way to replicate that functionality?
Are you talking about JS on a web browser? In that case, posting to the form via JS is probably considered CSRF and will be blocked by a modern browser. So no, likely not possible from a modern browser.
If you’re using node.js or another non-browser JS, then you could just do normal HTTP requests to sign in, handle the session cookie, and post to the form.