-
What do I want to achieve?
I want to fetch the __RequestVerificationToken which is required for things like group bots/accounts
I am trying to achieve this in python/node js -
What is the issue?
I have below code but it does not work anymore(it used to work a few months ago)
def getRequestVerificationToken(cookie):
session = requests.Session()
xcsrfToken = requests.post("https://auth.roblox.com/v2/logout", cookies={".ROBLOSECURITY": cookie}) #xcsrfToken only works with requests, not session
xcsrfToken = xcsrfToken.headers["x-csrf-token"]
session.cookies.update({".ROBLOSECURITY": cookie})
session.headers.update({"referer": "https://www.roblox.com", "x-csrf-token": xcsrfToken})
requestHTML = session.get("https://www.roblox.com/build/upload")
soup = BeautifulSoup(requestHTML.text, "html.parser")
requestVerificationToken = soup.find("input", {"name" : "__RequestVerificationToken"}).attrs["value"]
return requestVerificationToken