what if somebody has a user with the exact same name
This is not possible because github, gitlab, gitea, etc use the same database table to stores users and repositories where the name is a unique key and the type attribute identifies an entity as either a User or Organization. Note that you can use the same endpoint to access both user and organization data: