Roblox API Help

I am trying to use the roblox api the get a userid from a username. If there is a better way please tell me. I am using JS to create this. I am just very confused. I have tried to get the data but it comes back as undefined

const data2 = {
            "usernames": [
              username
            ],
            "excludeBannedUsers": true
          }

 const stuffs = axios({
            method: 'post',
            url: 'https://users.roblox.com/v1/usernames/users',
            data: data2
        })

Hello, thisis a way of getting a UserID from a player that isn’t in the game!

Hope this helps you! :smiley:

local UserID = game:GetService("Players"):GetUserIdFromNameAsync("Tyyuiss_RBLX")
print(UserID)