zachary cohen
zachary cohen

Reputation: 65

How do i get the uuid of a player in minecraft with nodeJS?

I am working on a discord bot that gets information from a server. for this to work, i need the uuid of a minecraft player. I am using a dependency, but it is not working. Even if I enter a valid name, it still gives me this: code & output

the string of numbers in the console is a character in minecraft named undefined... so yeah, if you see that my code isn't in the right data type (for example, it was supposed to be an integer instead of a string), please tell me. Thank you!

Upvotes: 1

Views: 3149

Answers (1)

yogurtsyum
yogurtsyum

Reputation: 348

Send a request to:

https://api.mojang.com/users/profiles/minecraft/

This will give you the UUID of the specified Minecraft username.

Upvotes: 2

Related Questions