Error solving challenges in roblox web api

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Finding a way to solve the challenge given in apis

  2. What is the issue? Hello I am trying to remove my passkeys using roblox api but I keep using into issues with roblox challenge api for some reason it wont let me disable it

  3. What solutions have you tried so far? I’ve tried finding someone with the same issue as me but I couldn’t I’ve also made it so the only security the account has is password and I tried using disabling challenge in different apis like changing email but it also didn’t work

import requests

def request_cookie(cookie):
    auth_response = requests.post(
        "https://auth.roblox.com/v1/logout", headers={"cookie": f".ROBLOSECURITY={cookie}"})
    if auth_response.status_code == 403:
        if "x-csrf-token" in auth_response.headers:
            token = auth_response.headers["x-csrf-token"]
            headers = {
                "cookie": f".ROBLOSECURITY={cookie}",
                "x-csrf-token": token
            }
            return headers

cookie = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_"
headers = request_cookie(cookie)
Password = "password"
USER_ID = "6089502424"

data = {
    "all": "true"
}
Passcord_list = []
message_response = requests.post(
    f"https://auth.roblox.com/v1/passkey/ListCredentials", headers=headers, json=data)
for i in message_response.json()['credentials']:
    Passcord_list.append(i['nickname'])
print(Passcord_list)   #prints the Passcord list i have

data = {
    "credentialNicknames": Passcord_list
}
message_response = requests.post(
    f"https://auth.roblox.com/v1/passkey/DeleteCredentialBatch", headers=headers, json=data)
print(message_response.json())   #returns Challenge is required to authorize the request as it requires password to remove Passcords note I dont have any security in the account except password
    
challenge_id = message_response.headers['rblx-challenge-id']
print(f"challenge_id = {challenge_id}")

data = {
    "password": Password,
}
message_response = requests.post(
    f"https://apis.roblox.com/reauthentication-service/v1/token/generate", headers=headers, json=data)
challenge_meta = message_response.json()['token']
print(f"challenge_meta = {challenge_meta}")

data = {
"challengeId": challenge_id,
"challengeMetadata": "{\"reauthenticationToken\":\"example\"}".replace("example", challenge_meta),
"challengeType": "reauthentication"
}

message_response = requests.post(
    f"https://apis.roblox.com/challenge/v1/continue", headers=headers, json=data)
print(f"Response from Reauthentication: {message_response.json()}")
print(message_response.status_code)  # returns 200 (success)
data = {
    "credentialNicknames": Passcord_list
}
message_response = requests.post(
    f"https://auth.roblox.com/v1/passkey/DeleteCredentialBatch", headers=headers, json=data)
print(message_response.json())    # says Challenge is required to authorize the request even after Reauthentication is successful

Here is what I get in my therminal:

['Windows Hello']
{'errors': [{'code': 0, 'message': 'Challenge is required to authorize the request'}]}
challenge_id = 710c3a5a-dcc6-4ad0-ace2-27eb7d97a980
challenge_meta = bfce33c0-4ba1-42f5-98fb-c170ecff465d
Response from Reauthentication: {'challengeId': '710c3a5a-dcc6-4ad0-ace2-27eb7d97a980', 'challengeType': '', 'challengeMetadata': ''}
200
{'errors': [{'code': 0, 'message': 'Challenge is required to authorize the request'}]}
1 Like