Skip to content
Related Articles
Open in App
Not now

Related Articles

How to accept all pending connection requests on LinkedIn using JavaScript ?

Improve Article
Save Article
  • Last Updated : 24 May, 2021
Improve Article
Save Article

Many times we get a lot of connection requests over LinkedIn, and we want to accept all of them but for that, we have to click the accept button for each connection request. With the help of the following way, we can accept all of them at once using JavaScript helping us to save our time and effort.


  • Make a variable connection that points to an array of all the pending connections.
  • Run a loop to iterate all the pending connection.
  • Then click on the accept button of that connection request using the JavaScript click function.


  • Go to the LinkedIn page or click here.
  • If you are not Signed in. You should Sign in to your account.

  • Open the My Network tab visible on the page.

  • Click on the Show more button to see all the connection requests.
    Note: The show more button will only be visible if you have more than 3 connection requests. Keep on clicking until all the connection requests are visible.
  • Open the developer console by pressing F12 or CTRL+SHIFT+I

  • Copy and paste the following script on the console and hit enter.


var connection = document
for(var i = 0; i < connection.length; i = i + 1)


Before running script:

After running script:


  • Please ensure that there is a stable internet connection available so that the script runs smoothly.
  • The script will only work when all the connections are visible.
  • This tutorial is for educational purposes only.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!