Cancel Sent Follow Requests on Instagram using JavaScript

On Instagram, you might have sent too many requests to others and you may not know which all have been still pending as requests and might want to cancel them. Don't worry Instagram now allows you to see the accounts you have requested to follow and are still pending without accepting or canceling.

On the Instagram app, go to Settings > Security > Access Data > Current follow requests.
Now you can see a list of accounts having pending requests you have sent.

To cancel these requests manually you have to copy each Instagram ID and search for it. After finding the account of each person one by one you can cancel the request like we normally do.

But you can automate this process using JavaScript. For that go to this page on your PC browser. (https://www.instagram.com/accounts/access_tool/current_follow_requests).

Make sure yo have allowed Pop-ups for this site on your browser. If not allow Pop-ups for this site.
To allow Pop-ups on Chrome and Mozilla follow the steps on the links.

If you have more than 10 requests pending, there will be a View More button But Don't Click it. It's because Instagram doesn't allow more than about 10 requests(might be 12 or 13) to be canceled or unfollowed at once even if you are doing it manually just refresh the page after you cancel the request or unfollow after this limit you will see that it's not done.  

Open Inspect Element mode on your browser by right-clicking or by keyboard shortcut(F12).

Go to the console tab and paste the code given below.
 var i=0;  
 var unfollow="global";  
 var final="global";  
 var link=["link","link2"];  
 var proWindow=[""]  
 proWindow.length=0  
 link.length=0;  
 var ids = document.querySelectorAll(".-utLf");  
 for(i=0;i<ids.length;i++){  
   link.push('https://www.instagram.com/'+ids[i].innerText+'/');  
      console.log(link[i]);  
      proWindow[i]=window.open(link[i]);  
 }  

Now click Enter to run the code. Now you will see all the accounts opened on separate tabs on your browser. After all the tabs of the account have been loaded completely, Paste the code below on the same console window below the first code.
for(i=0;i<ids.length;i++){
 unfollow = proWindow[i].document.querySelector("button._acan");
 unfollow.click();
 await new Promise(resolve => setTimeout(resolve, 1000));
 final = proWindow[i].document.querySelector("button._a9--");
 final.click();}
console.log("Completed");  

Click Enter to run the code and see the message "Completed displayed" on your console window. Now go through the account tabs which have been opened before to see all of them unfollowed or canceled the request.

As I have warned you earlier if you go doing this all the time, you will find on refreshing the accounts that it has not been unfollowed. This is an Instagram algorithm to reduce scammers, even if you manually try to unfollow more than 10 or 12 accounts at a time it will not work out. 

DISCLAIMER

This tutorial post is just for educational purposes and usage of it should be taken at your own risk. Using the above method may violate Instagram policies(as it changes over time). I will not be responsible for any damages caused by the above method.

Jobin Jose

46 comments:

  1. after some account it stop and don't work any more can make one that block then unblock the account so it unfollow them even when it already stop you from unfollow others

    ReplyDelete
    Replies
    1. Uncaught TypeError: Cannot read properties of null (reading 'click')
      How can this problem be solved please?

      Delete
  2. thank bro thanks for sharing a wonderful script

    ReplyDelete
  3. Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your feed to stay informed of any updates. ルーレット

    ReplyDelete
  4. Replies
    1. Thank you for commenting. I have rechecked the code and it is properly working. Please check if you have mistyped.
      The common mistake people make is running the second code before all the pop up pages have completely loaded.
      I hope you get it right.

      Delete
  5. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog, I will keep visiting this blog very often. instagram girls

    ReplyDelete
  6. This action was blocked. Please try again later. We restrict certain content and actions to protect our community. Tell us if you think we made a mistake.

    ReplyDelete
  7. There are some wrongs in second code, but i cant understand why

    ReplyDelete
    Replies
    1. Thank you for commenting. I have rechecked the code and it is properly working. Please check if you have mistyped.
      The common mistake people make is running the code before all the pop up pages have completely loaded.
      I hope you get it right.

      Delete
    2. VM252:3 Uncaught TypeError: Cannot read property 'click' of null
      at :3:11
      (anonymous) @ VM252:3

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Same problem how did u solve this problem .. 5 months before when i tried this it had worked for me now it shows queue selector error.

      Delete
  8. very nice post, i undoubtedly adore this excellent website, carry on it Buy Instagram Likes and Followers Online

    ReplyDelete
  9. after Copy Paste of First step all new insta window open as page not found ?

    ReplyDelete
  10. Thanks for sharing such a useful article!

    ReplyDelete
  11. 2nd code is not working now. Its saying taht the action is blocked

    ReplyDelete
    Replies
    1. same here, 2nd code didn't work, after executing the 2nd code, it gave me the following error msg:
      VM552:3 Uncaught TypeError: Cannot read property 'click' of null
      at :3:11
      not sure where could be the problem sir ?

      Delete
  12. after 2nd code it errors and sometimes it doesnt error but doesnt even open the mf page it says error wait a few minutes and try again like wtf I've waited 3 days and it still says the samethinggg! it either errors on the second code or even when it doesnt it errors it errors on opening the tabs "please try again ina few minutes" help us please we have more than 1000 requests trying to UN request them all!!!

    ReplyDelete
    Replies
    1. Most people get error on running the second code because of mostly 2 reasons.
      1. They don't allow pop ups on the page
      2. They run the second code before completion of loading of every accounts opened on the new tab.

      Delete
  13. well the second code is not working it is showing uncaught error please check it out.

    ReplyDelete
  14. Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at :2:35

    I am getting this error now. Earlier this method worked perfectly. Can anyone help?

    ReplyDelete
  15. I’m getting the same error “ Uncaught TypeError: Cannot read property 'querySelector' of undefined”.

    The second code is not working. Can anyone help please?

    ReplyDelete
  16. earlier this used to work but now only one request get cancelled.. and some error shows

    ReplyDelete
  17. Hey dude please solve this error -
    2nd script -
    Uncaught TypeError: Cannot read property 'querySelector' of undefined
    at :3:35
    (anonymous) @ VM43:3
    please solve this error as soon as possible we are facing issue and update the script .

    ReplyDelete
  18. bro please update the script it doesnt work anymore

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Code updated and working:

    https://pastebin.com/H6YraSv7

    ReplyDelete
    Replies
    1. VM252:3 Uncaught TypeError: Cannot read property 'click' of null
      at :3:11
      (anonymous) @ VM252:3
      pls help

      Delete
  22. VM252:3 Uncaught TypeError: Cannot read property 'click' of null
    at :3:11
    (anonymous) @ VM252:3
    pls help

    ReplyDelete
  23. Really Appreicated,I was Looking about some trick to remove follow request.
    Techsable

    ReplyDelete
  24. Grow your audience on instagram by buying instagram services. no need to follow/unfollow request for instagram promotion anymore. خرید کامنت اینستاگرام

    ReplyDelete
  25. Uncaught TypeError: Cannot read properties of null (reading 'click')
    How can this problem be solved please? pls what would i do

    ReplyDelete
  26. can someone please post the updated script?

    ReplyDelete
  27. Earlier it used to work correctly but not now.

    ReplyDelete
  28. im also trying but first code perfectly run but second code rune time show errors

    ReplyDelete
  29. It does not work anymore because now on Instagram there's no such section in settings where you can check your sent follow requests.

    ReplyDelete
  30. فالوور با کیفیت اینستاگرام
    https://magicfollower.net/buy-instagram-follower/

    ReplyDelete