I want to make a request to https://auth.roblox.com/v1/authentication-ticket with the referer as https://www.roblox.com/home. How would I add the referer parameter to the fetch request?
const cookie = "cookie";
const csrf = "assuming we have csrf ticket already";
const gticket = await fetch(
"https://auth.roblox.com/v1/authentication-ticket",
{
method: "POST",
headers: {
Cookie: ".ROBLOSECURITY=" + cookie,
"x-csrf-token": csrf,
},
referrer: "https://www.roblox.com/home"
}
);
const ticket = await gticket.text(); // error debugging
console.log(ticket);
I tried the code above but it did not work. Please help me resolve this issue.
{“errors”:[{“code”:2,”message”:”The UrlReferrer was invalid or came from outside Roblox.”,”userFacingMessage”:”Something went wrong”}]}