Anonymous
Почему API Roblox Quick Login возвращает ошибку 403 при проверке состояния входа в систему?
Сообщение
Anonymous » 28 янв 2025, 01:32
Когда я сканирую QR из кода быстро-логина и успешный вход, затем отправляю сообщение в конечную точку состояния, ответ отражает, что я не вошел в систему. < /p>
Код: < /p>
Код: Выделить всё
// sending post to create endpoint to generate qr code and login code
app.post('/login/create', async (req, res) => {
console.log('Creating login session...');
try {
const response = await axios.post('https://apis.roblox.com/auth-token-service/v1/login/create', {}, {
headers: {
'accept': 'application/json, text/plain, */*',
'accept-language': 'en-US,en;q=0.9',
'cookie': req.headers.cookie,
'x-csrf-token': req.headers['x-csrf-token'],
}
});
const { code, imagePath, privateKey } = response.data;
const qrCodeUrl = `https://apis.roblox.com/auth-token-service${imagePath}`;
console.log('Login session created successfully:', { code, qrCodeUrl, privateKey });
res.json({ code, qrCodeUrl, privateKey });
} catch (error) {
console.error('Error creating login session:', error.message);
res.status(500).json({ error: error.message });
}
});
< /code>
//login status once I scan the qr code and approve the login
app.post('/login/status', async (req, res) => {
const { code, privateKey } = req.body;
console.log('Checking login status for code:', code);
try {
const response = await axios.post('https://apis.roblox.com/auth-token-service/v1/login/status', {
code,
privateKey
}, {
headers: {
'accept': 'application/json, text/plain, */*',
'accept-language': 'en-US,en;q=0.9',
'content-type': 'application/json;charset=UTF-8',
'x-csrf-token': req.headers['x-csrf-token'],
}
});
console.log('Login status response:', response.data);
res.json(response.data);
} catch (error) {
console.error('Error checking login status:', error.message);
res.status(500).json({ error: error.message });
}
});
< /code>
Но он все еще возвращает: < /p>
Checking login status for code: B8VHPW
Error checking login status: Request failed with status code 403
Чего мне не хватает?
Подробнее здесь:
https://stackoverflow.com/questions/793 ... gin-status
1738017137
Anonymous
Когда я сканирую QR из кода быстро-логина и успешный вход, затем отправляю сообщение в конечную точку состояния, ответ отражает, что я не вошел в систему. < /p> Код: < /p> [code]// sending post to create endpoint to generate qr code and login code app.post('/login/create', async (req, res) => { console.log('Creating login session...'); try { const response = await axios.post('https://apis.roblox.com/auth-token-service/v1/login/create', {}, { headers: { 'accept': 'application/json, text/plain, */*', 'accept-language': 'en-US,en;q=0.9', 'cookie': req.headers.cookie, 'x-csrf-token': req.headers['x-csrf-token'], } }); const { code, imagePath, privateKey } = response.data; const qrCodeUrl = `https://apis.roblox.com/auth-token-service${imagePath}`; console.log('Login session created successfully:', { code, qrCodeUrl, privateKey }); res.json({ code, qrCodeUrl, privateKey }); } catch (error) { console.error('Error creating login session:', error.message); res.status(500).json({ error: error.message }); } }); < /code> //login status once I scan the qr code and approve the login app.post('/login/status', async (req, res) => { const { code, privateKey } = req.body; console.log('Checking login status for code:', code); try { const response = await axios.post('https://apis.roblox.com/auth-token-service/v1/login/status', { code, privateKey }, { headers: { 'accept': 'application/json, text/plain, */*', 'accept-language': 'en-US,en;q=0.9', 'content-type': 'application/json;charset=UTF-8', 'x-csrf-token': req.headers['x-csrf-token'], } }); console.log('Login status response:', response.data); res.json(response.data); } catch (error) { console.error('Error checking login status:', error.message); res.status(500).json({ error: error.message }); } }); < /code> Но он все еще возвращает: < /p> Checking login status for code: B8VHPW Error checking login status: Request failed with status code 403 [/code] Чего мне не хватает? Подробнее здесь: [url]https://stackoverflow.com/questions/79392333/why-does-roblox-s-quick-login-api-return-a-403-error-when-checking-login-status[/url]