Issue obtaining .ROBLOSECURITY cookie

Hey!
I’m making a group ranking bot, and similar to this post the ROBLOSECURITY cookie keeps resetting before I can actually use it in my bot. I’m using Noblox.js (4.15.1) to handle ranking requests.

Methods I’ve tried: (All unsuccessful)

  • Retrieving the cookie in an incognito window, then closing the tab then running my bot.
  • Retrieving the cookie in an incognito window, then running the bot and not closing it.
  • Retrieving the cookie in an incognito window, then logging out then running my bot.
    I’ve also attempted all of the above in regular windows too, with VPNs and everything.

Also, in the post mentioned above, someone replied with a solution involving a cookie extension, tried their method and the cookie was also invalid.

I either get one of two errors when I run the bot:
Error: Cannot get CSRF: You are not logged in.
or
Failed to validate cookie: Are you sure the cookie is valid?
I’ve learned that the first error happens when the cookie may be valid but there may be an error in the code, however this can’t be as I’m using a slightly altered version of Noblox’s quickstart code snippet in their documentation, and the second occurs when it isn’t valid.

This is written in Node.js:

async function startRanker() {
    try {
        const currentUser = await noblox.setCookie(cookie);
        console.log("Successfully logged in as ", currentUser.UserName);
    } catch (error) {
        console.error("Failed: ", error);
    }
}

startRanker();

Any help would be appreciated!

Hey! So my colleague and I did eventually find a solution to this. Weirdly because we both currently did not live in the US the cookie kept on changing after we were copying it.

If I do remember correctly the cookie did not change if I ran the code on my local pc but if I used a host such as replit it would not work. Strange.

Anyways, he asked someone who lived in the US to do it for him and it worked fine. As far as I know its been working fine and dandy since.

I can’t recall exactly how we came to the conclusion to try such thing but if you have a VPN and can connect to the US maybe try that, otherwise look for someone living there to help you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.