Cookie disabled or private mode in chrome or firefox extension background request

I am creating a extension for Firefox or chrome like everliker in chrome I want to like my posts on my behalf with this extension.

Everliker does what I want but I want to write it because we can’t use this extensions pro plan we can’t purchase it (US boycotted us and google as well and the payment of everliker is base on google payment:|).

So I want to create it myself and it’s working well but just one problem!! when I want to like posts:

var r = {
    method: "POST",
    headers: {
        Accept: "application/json, text/javascript, */*; q=0.01",
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
        "X-CSRFToken": '9CdUSqRg9E48Yzcrl1DJfsjYYI8fEeci',
        "X-Instagram-Ajax": "1",
        'Origin': 'https://www.instagram.com',
        "X-Requested-With": "XMLHttpRequest"
    },
    credentials: "include"
};
console.log(fetch(likeUrl, r, n).then(this._toJson))

I get this error:

enter image description here this is the error if picture doesn’t appear:

Error

This page could not be loaded. If you have cookies disabled in your browser, or you are browsing in Private Mode, please try enabling cookies or turning off Private Mode, and then retrying your action.
I don’t know how should be headers or how should enable cookies with headers as the error referring to this!

I will appreciate any suggestion or help Thanks