Is it possible to purchase a gamepass using roblox api?

There are websites like hazem.gg, which automatically purchase a user’s gamepass after redeeming a “code”. Is it possible to replicate this using roblox api, and how? (If it was, I would ideally use axios for the request on javascript.)

Using the Roblox API is not directly possible due to the platform’s security measures and restrictions.

I’d recommend checking out noblox.js.

Whenever I try to do noblox.setCookie, it says that the token is invalid even though I followed their steps.

If I recall correctly, each time you login or log out of the account, the cookie will change. You should login to the account you are using in an incognito window, grab the cookie, and then close the window. Don’t login/logout of the account again or it will reset.

Correct me if I am wrong, but I’m pretty sure that it only works when the login is from my ip, whereas I am using a different server to send the requests. How do I manually whitelist an IP for the roblox account?