hello, wanted to get my robux but i need to authenticate.
i have tried this in python:
import requests
header = {
Cookie: ".ROBLOSECURITY_HERE"
}
r = requests.get(url="https://api.roblox.com/currency/balance",headers=header)
print(r)
but it gives this error:
NameError: name 'Cookie' is not defined
1 Like
heII_ish
(heII_ish)
April 13, 2021, 9:05am
#2
Should be like this I believe
"Cookie": ".ROBLOSECURITY_HERE"
i have tried that before but it didnt work, it gives error code 403
1 Like
heII_ish
(heII_ish)
April 13, 2021, 9:11am
#4
Are you sure your cookie isn’t expired?
how do i check it?
and if it is expired, how do i change it?
1 Like
Suncurve
(Suncurve)
April 13, 2021, 9:13am
#6
When you log out, your cookie resets. Assuming your using another account than your main, open a new icognito window (if you’re using chrome) and log in to the account there, take the cookie and close the window.
heII_ish
(heII_ish)
April 13, 2021, 9:16am
#7
If it returns code 403 that means you don’t have authorization, aka cookie has expired or is incorrect. You should try what @devjden suggested
When you log out, your cookie resets. Assuming your using another account than your main, open a new icognito window (if you’re using chrome) and log in to the account there, take the cookie and close the window.
it still returns error code 403
1 Like
heII_ish
(heII_ish)
April 13, 2021, 9:21am
#9
Just means that the cookie is incorrect. What are you using to grab the cookie?
heII_ish
(heII_ish)
April 13, 2021, 9:27am
#11
That should work. Is your cookie in this format?
.ROBLOSECURITY=_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_ABCDEF123456789 (Long string of characters)
1 Like
it worked, i forgot to put that in
1 Like
Random question, are you using a site with public projects? If so, you should set your Cookie in a .env file.
I mean, where are you hosting your project? Like getting your robux balance, where are you writing your code?
am writing my code in visual studio code
Ah okay, sorry. Was just concerned because if this was on an online site like https://repl.it , people could potentially steal your cookie.
1 Like