> For the complete documentation index, see [llms.txt](https://tuneguycodr.gitbook.io/robloxy-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tuneguycodr.gitbook.io/robloxy-docs/users/get-id-from-username.md).

# Get ID From Username

The function to get a user ID from their Roblox username!

It's easy to get a ID from roblox username with Robloxy, this function returns a promise which can be resolved into an integer value&#x20;

```javascript
const blox = require('robloxy')

blox.getID("ROBLOX")
.then(id => console.log(id))
.catch(err => console.log('That user does not exist'))
```

In this case we are getting the ID of a roblox user whose name is ROBLOX, feel free to replace "ROBLOX" with any username, the value you enter in the function should be a string and a valid Roblox username or it will throw errors! In this case, this should be logged in the console :

```javascript
1
```
