Roblox Web API not working anymore

Hi guys, i own a Discord bot called Rosearch that uses api.roblox.com to do roblox user lookups.
Recently, the bot’s roblox user lookup function has stopped working as the http request returns User Not Found.

I tried entering the link http://api.roblox.com/users/get-by-username?username=${username} manually and it works, but not on my bot.

Anyone knows why? I figured it’s like where you must request multiple times for the api to wake up or smth.

Edit: nevermind, it was my stupid error rejection code bruh

1 Like

It’s possible that ever since the old api for sending password reset links was abused(a recent issue) , Roblox added a temporary limit to how many web calls you can make while they investigate.

Other than that, I wouldn’t be so sure about this.

1 Like

But I only used the user lookup a few times tho and not of them worked

Have you tried console.log()'ing the username variable right before the request call? There could be something like a space in it which breaks the request. Also make sure you use `` for the url string.

Nope, it used to be working fine until recently

You are passing incorrect parameters to the API. If you send a request to this (paste it in your browser):
http://api.roblox.com/users/get-by-username?username=LordHammy you will see that it returns data correctly.

Please paste relevant code so that I can review it and find the problem. All you’ve provided is sending a request with the variable username but nothing about where username is coming from. Your argument for username is incorrect and so the API correctly tells you that it can’t find the user.

1 Like

That’s exactly what I’m doing b r u h

It’s just node js where you replace the params with ${username} since the variable username is the discord commands param

Could you do as Kiriot says and console.log username? You may of added code that conflicts with the username variable. We don’t have any code, so we can’t help you. Please post relevant code and the result of the console.log.

You can’t retrieve data from HTTP Requests from the Roblox website, They block all Requests Because they don’t want their servers getting spammed and maybe even DDosed. That being said, There is this neat thing called Proxies, And there is a very well known one which is rprxy.xyz. All you have to do is replace roblox.com in your url with rprxy.xyz

He’s coding a discord bot. He is not using lua or Roblox. He’s only using their API.

2 Likes

My apologies, Completely went over that, But i did some testing and the api works completely fine. Here is what i did.

const thing = 'http://api.roblox.com/users/get-by-username?username=ObscureBrandon'
function httpGet(theUrl)
{
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
    xmlHttp.send( null );
    return xmlHttp.responseText;
} 
var data = JSON.parse(httpGet(thing))
console.log(data['Id'])

Seems to work completely fine

Yes, I’m aware. Works for me as well, which is why I was asking for relevant code. His issue is “User not found” which means the username variable is most likely wrong.

It’s working fine

What is that? The username variable?

The username is valid and it works completely fine, Could you please provide your code if you want further assistance?

Are you surrounding the url with backticks (`)?
$(var) doesn’t work with normal quotes.