How do i get x-csrf-token?

its twitter api, been researching fo it for a week, cant find it :monkey:

Based on this:
image

Here is the openbullet2 lolicode to generate the x-csrf-token:

BLOCK:Script
INTERPRETER:NodeJS
INPUT 
BEGIN SCRIPT
const crypto = require("crypto");

const n = () => {
  if (!crypto) return;
  const randomBytes = crypto.randomBytes(32);
  let t = "";
  for (let i = 0; i < randomBytes.length; i++) {
    t += randomBytes[i].toString(16).substr(-1);
  }
  return t;
};

const t = n();
END SCRIPT
OUTPUT String @t
ENDBLOCK

will this works on twitter api?

I grabbed it from their JS so yes it should
feel free to let me know if it doesn’t

1 Like

lmaoooo, Thanks!
Sure, i will comeback if theres any other issue

how did i use it? :monkey:

You need to have NodeJS installed on your system

alr, ill brb for another help im sure