A user name and user id are 2 separate things, so trying to use one for the other will not work.
The docs show there are 2 params you could use, https://dev.twitch.tv/docs/api/reference#get-users id or login, so if you’re wanting to use the user name rather than id, use the login param.