How to Create a Rank Management System using Glitch

@CityApes

Your cookies have most likely expired.
In order to get a new cookie, just follow Part 3 of the tutorial again.

I’ve gotten the cookie several times, and it keeps showing the same error.

HELP!

The only solution I can think of would be to get the cookie again.
Also, if there’s a file named “cookie” try deleting that and re-entering the cookie into the configuration file.

Oh my god, thank you!!

That worked! I was stuck for almost an hour, thanks!!

1 Like

I have private repls, that’s why I asked before.

@ChillingSystem How would I got about hosting this on my VPS?

Error running server: Error: No cookie supplied and no cookie file available.

Im getting a new error. P0lease could you update the code? Many thanks.

1 Like

I’m having this issue: Its giving me this error in roblox studio
image
I’m sure that I copied everything correctly so I have no clue what the issue could be.

5XX errors are from the server, which in this case is Glitch. Check your site to make sure it is working correctly.

1 Like

Which is the case for my site, image
I also checked the log on the glitch project but that wasn’t very useful to me.

EDIT: Turns out that the package.json file needed an update, and now everything is working correctly

It would be nice if somebody made a sequel to this but use 000webhost.com instead so it doesn’t require bots. :smiley:

Hi there, this is a great tutorial. Unfortunately I believe that noblox.js was updated and cookieLogin is no longer supported. I think you must now use setCookie and refreshCookie. However I have no knowledge on how to do this… If anyone could help me out that would be amazing.

2 Likes

I would use Glitch as it is more well known. The only really issue with Glitch right now is, custom domains.

There’s tons of issues with glitch, it takes multiple tries to use, people can easily give themself a role if you just name the glitch creation, it’s not worth it. 000webhost is always running unless it’s inactive for over a month I believe.

Sure, the limits are a bit low, but it’s a trade-off.

The only real issue with Glitch lately has been custom domains, as @chessebuilderman stated.

The reason people are able to rank themselves in your groups is because you haven’t protected your endpoints with some form of authentication, such as an API key. Without authentication, you’re leaving your API open to the world.

As a PSA (think it’s already been stated), Glitch no longer allows pinging services (such as Uptime Robot). If you would like to keep your project awake permanently, you will need to subscribe for around £7.80/month to enable “Boosted apps,” which keeps your app online and removes rate limits.

@SoulMonopoly I believe with noblox, the idea is that you regularly refresh the cookie to prevent it from expiring. You will need to store the resulting cookie in a file or database (SQLite is an option for this–it can be added to your project without the use of an external database hosting provider) as your app will need to use the new cookie when it needs to login.

You might set this up as a separate function which acts as a proxy for retrieving the cookie (from a file or database) or refreshing it after 24 hours (for example), and setting the noblox cookie.

2 Likes

This is somewhat true. So people are not the sharpest tool in the shed and they exported their cookie. Now, there is a new function call “setCookie” which would, set the cookie. You run that once and your cookie is set. As far as I know, it automatically refreshes the cookie.

Looking at the source code for noblox, it doesn’t appear to refresh automatically, but you could create a simple function for this no problem; either using some type of interval or cron job.

The documentation advises no less than 24 hours between refreshes, and that resulting cookies should be stored as you’ll need to reauthenticate using the refreshed cookie if the app is restarted.

It’s worth noting that it appears to be unknown how long cookies are valid for, so you may find that you could go months without needing to refresh–obviously you probably don’t want to wait this long, as if it does expire you will manually need to set the cookie again, so it’s best to do it in shorter intervals.

Further reading: GitHub - noblox/noblox.js: A Node.js API wrapper for Roblox.

1 Like

I have my ranking system connected to my bot. So I can run refresh cookie. I have a VPS I use to ping it whenever I need it so that I can refresh it. I would host it on my VPS but then I would have to expose the IP even with a custom domain. You can still use the old feature (not many people know). You would just have to find the setCookie file and find the code to ge tthe token and rewrite it to your own module, you can use it.

You can use an environmental variable.

Your code is still not safe. repl.it isn’t even needed. Glitch works fine. It turns on when you need it and off when you are not.

1 Like