I agree that this can be avoided with careful coding, but the current API makes it somehow easier to allow impersonation. It would be nice to have a specific API to get by name, and by id - unambiguously.
I don’t mean to bash the new api, and agree that’s not a twitch concern by itself, but IMO an API should try to avoid these kinds of conflicts/ambiguity.