Http 403 Forbidden when trying to login

Hi, I’m currently trying to login using the ROBLOX API and I keep getting an error saying it’s Forbidden, I don’t see why it is because I’m not trying to access something I shouldn’t be and I haven’t found anyone else with the same problem so I’m stumped.

const axios = require('axios');

async function login(cookie) {
	let headers;
	if (cookie) {
		headers = {
			'X-CSRF-TOKEN': cookie
		};
	}
	await axios
		.post(
			'https://auth.roblox.com/v2/login/',
			{
				ctype: 'Username',
				cvalue: 'yes',
				password: 'no'
			},
			{
				headers,
			}
		)
		.then(v => console.log('yayyyy'))
		.catch(v => {
			console.log(v.request.res.statusMessage);
			login(v.request.res.headers['x-csrf-token']);
		});
}

login();

Sorry nevermind I thought this was lua, please ignore my previous comment if it still appears

You probably can’t login due to the capatcha.

However, most of the roblox API for bots (like rank managers) won’t have the capatcha, and you can just use the cookie and fire a request there

Passing passwords through a game is against t&c, along with api access to roblox is blocked by roblox itself.

Review what you are trying to do as this is very questionable.

Even if you manage to do it you can be banned or even be followed up with legal action depending on the extent (more extreme situations)

It’s not the captcha, that gives a different error, I have no idea what’s up with this though

It’s ROBLOX’s API, if it wasn’t allowed they wouldn’t have it

image

I’d say that from my testing 90% of the time Error 403 is Capatcha (this is wall post docs btw)

1 Like

You made the same mistake as I, and thought this was lua because usually that’s what Scripting Support is for.

Unless this is js on roblox, which I didn’t even know was possible

It’s giving me Forbidden, not a captcha error, I don’t think it even gets there

Scripting support is anything related to scripting on roblox, which also includes bots :wink:

This is a support category for help on everything related to scripting on the Roblox platform, from extremely basic to even the most technical of issues. Make sure to search the forum before creating a new topic, many beginner / learning resources have already been created, or maybe your problem has already been solved by someone else.

1 Like

I know, I just meant that I was inclined to think it was lua becuase 90% of new posts are lua

1 Like

As kingerman88 is saying, it might indeed be a captcha error,


you can see here that one of the reasons you might get 403 / Forbidden is Captcha must be solved

These are all the API errors for 403 for login

it looks like the ctype is actually email rather than username, at least this is the demo on the docs site

{
  "ctype": "Email",
  "cvalue": "string",
  "password": "string",
  "captchaToken": "string",
  "captchaProvider": "string"
}

There are also other types like Username, PhoneNumber etc

1 Like

Hey Valient, I know it’s been a while and all, just coming across this post. You would need a Captcha Solder, such as 2Captcha, you would need to specify the provider as PROVIDER_ARKOSE_LABS and send a request to the roblox arkose API.

Here is a screenshot of my latest Captcha Solving software.

Any additional help feel free to DM me on discord, I’m sure you have my user already.