#Roblox Trade API - Send Trade with 2FA: I am going crazy, trying to solve this for weeks now

1 messages · Page 1 of 1 (latest)

narrow marsh
#
async getCSRF(cookie: string, proxyy: Proxyy) {
    const url = 'https://auth.roblox.com/v2/logout';
    const robloxCookie = '.ROBLOSECURITY=' + cookie;
    const proxyAgent = new HttpsProxyAgent.HttpsProxyAgent(
      `http://${proxyy.username}:${proxyy.password}@${proxyy.address}:${proxyy.port}`,
    );
    
    const tokenOptions = {
      method: 'POST',
      httpsAgent: proxyAgent,
      headers: {
        'Content-Type': 'text/plain;charset=UTF-8',
        Cookie: robloxCookie,
        'User-Agent':
          'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0',
      },
    };
    const token: any = await makeRequest(url, tokenOptions);
    return token.headers['x-csrf-token'];
  }

  async getAccountSecurityCookies(cookie: string, proxyAgent: any) {
    const res = await makeRequest('https://www.roblox.com/my/account#!/security', {
      method: 'GET',
      httpsAgent: proxyAgent,
      headers: {
        'Cookie': '.ROBLOSECURITY=' + cookie,
      }
    })
    if (res.headers['set-cookie']) {
      return res.headers['set-cookie'];
    } {
      throw new HttpException(
        {
          status: HttpStatus.FORBIDDEN,
          error: 'Could not get security cookies',
        },
        HttpStatus.FORBIDDEN,
      );
    }
  }

#

RESULT:

#

I got the trade sent 2 times with the same exact code but it's not working 90% of the time

rich ruin
#

it's not working 90% of the time

#

probably maybe most likely because

#

ur not solving the captcha

narrow marsh
#

it's not about the captcha

#

there's no captcha

rich ruin
narrow marsh
#

It's 2FA challenge

#

2FA code

rich ruin
#

ah

wary topaz
#

are you completing the 2fa workflow

narrow marsh
#

What do you mean?

wary topaz
#

for 2fa dont you have to get and upload the code?

narrow marsh
#

Yes I'm getting the 2fa

#

The 2FA code is working because it returns me the verification token

narrow marsh
wary topaz
#

im not sure ill need more time to look at it

#

ive never used the trades api

narrow marsh
#

We can call

#

I can explain it briefly

narrow marsh
#

It works one time

#

But one time it doesn't