API to get userid from username?

Can’t seem to find this anywhere.

To clarify, I’m not using LUA hence why I need the api and not GetUsernameFromUseridAsync

1 Like

If not, you’ll have to make a request to the roblox API in order to attempt to get it.

Yes I just said this was unsuitable for my project sadly

https://api.roblox.com/users/get-by-username?username=Inobservatus

Use either the legacy API (/users/get-by-username?username=ROBLOX) (Sunset) or POST /v1/usernames/users (recommended, as it’s supported)

4 Likes

As I mentioned, you’ll need to use HttpService to make a request on that call, don’t think you can send a direct request to the roblox servers themselves, perhaps a remote server can be used.