Instagram is a popular platform for users. If you see the CSRF token missing or incorrect error message when logging into your Instagram account, don’t worry at all. In the following, you can use some simple solutions to solve this problem.

What is CSRF?

CSRF stands for Cross-Site Request Forgery attack. Other names of this type of attack are “on-click” attack and session riding. The way it works is that the authorized user of a website is tricked into unintentionally sending a URL and a request to that website. Considering that the website trusts its users, it executes their requests. In fact, the attacker tries to get the users of a website to click on a link so that a request is sent from these users to the website’s server.

In this type of attack, if the user clicks on the link that they send to them, they allow them to do any abuse. For example, an attacker can change users’ passwords or transfer money on their behalf.

CSRF token missing or incorrect

Why do I see “CSRF token missing or incorrect”?

The reason for showing this error on Instagram is related to your browser’s problem in creating a secure cookie. Sometimes the issue is because the browser cannot access that cookie to allow you to log in. If you have not allowed cookies to be set in your browser or if you are using ad-blocking plugins, you may have this problem.

How to fix “CSRF token missing or incorrect“?

#1 Change the browser

I have tested this method, and it did work for me. I was using Firefox, and for all accounts I was getting the same error. So, I used Chrome to login to Instagram account, and it worked. So, it’s better before changing any settings on your computer, test this method.

If you want to enter your Instagram using a browser and encounter this error, you must allow it to set cookies to solve the problem: 

#2 Open incognito window on a browser

If you are trying to login via laptop or computer, open a new window in incognito (New Private Mode in Firefox) mode. It does work in most of the cases, and I have myself tested it too. It worked.

CSRF token missing or incorrect

#3 Change settings on Google Chrome

  1. Click on the three dots icon at the top right of the browser screen and select settings.
  2. Click on the hamburger button and select the “Privacy and Security” option.
  3. Find the “cookies and other site data” option from the available list and click on it.
  4. Go to the bottom of the page. The list of sites that can always use cookies is listed below.
  5. Click on the Add button and type the Instagram URL address there.
  6. Click on See all site data and permissions, find Instagram, and click on the delete icon.
  7. Close and reopen Chrome to see if your problem is resolved.

#4 Change the settings on Firefox browser

  • Click on the hamburger button at the top of the page and then select options.
  • Click on the lock icon on the left to open Privacy and Security.
  • Click on Manage exceptions under Cookies and site data and enter the Instagram website URL address.
  • Then click on Manage data.
  • Search for Instagram and click Remove All Shown.
  • Save these changes.

#5 Connect to a stable internet

When you encounter such errors to enter Instagram, check your internet connection. If you use mobile data, connect to the Wi-Fi network or vice versa. You can turn the Wi-Fi router off and on to solve the problem.

#6 Check out the Chrome browser’s JavaScript console

If you are using the Google Chrome browser or a browser based on it, open the JavaScript console of the browser and copy the following statement into it.

You can press Ctrl + Shift + I keys to access the JavaScript console.

n=new Date;t=n.getTime();et=t+36E9;n.setTime(et);document.cookie=’csrftoken=’+document.body.innerHTML.split(‘csrf_token’)[1].split(‘\\”‘)[2]+’;path=\;domain=.instagram.com;expires=’+n.toUTCString();

#7 If your device’s memory is full, make some space free

To free up some of your device’s memory, you can delete some extra files there. How do you know if your device’s memory is full or not?

On iOS devices, you can go to Settings > General > Storage and check your phone’s memory.

On Android phones, you can also go to the settings and then the storage section and check the information about the phone’s memory.

#8 Update the version of the operating system version installed on your phone

iPhone:

  1. Connect your iPhone or iPad to a high-speed and stable Internet network.
  2. Enter the Settings section of the iPhone.
  3. Select the General option.
  4. Select the Software Update option.
  5. Tap on the Download & Install option.

Android phone:

  1. Go to your phone settings.
  2. Scroll down and find Software Update.
  3. Tap on Download and Install.

#9 Update the Instagram app installed on your device

If you want to update your Instagram app, it is better to use App Store (for iPhone) and Play Store (for Android). So go to one of these two applications and search for Instagram in the search box. After you see the search results, if the version of the Instagram app on your phone is up to date, you will see an “Open” button. Otherwise, instead of the Open button, there will be an “Update” button. Click on it to download the new version and then install it.

Author

Write A Comment