I basically copy-pasted the MDN code, and I triple checked the URL. I can't find the reason as to why the responses differ. For reference, here is my code: Edit: Didn't see cookies got sent, I'm sorry
function getUsernames(str) {
console.log(str)
}
function reqListener() {
alert(getUsernames(this.responseText));
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "https://www.instagram.com/graphql/query/?query_hash=c76146de99bb02f6415203be841dd25a&variables=%7B%22id%22%3A%2217199917378%22%2C%22include_reel%22%3Atrue%2C%22fetch_mutual%22%3Atrue%2C%22first%22%3A24%7D");
oReq.responseType = "arraybuffer";
oReq.send();
oReq.onload = function(e) {
var arraybuffer = oReq.response; // not responseText
console.log(arraybuffer)
/* ... */
}