The reason for the 404 is because you’re using a v5 endpoint without specifying v5 in the request, so you would need to add the Accept: application/vnd.twitchtv.v5+json header, or api_version=5 as a querystring param.
Alternatively, because v5 is deprecated and being removed at the end of the year, you might want to switch to the new API and use the Helix users endpoint as documented here: https://dev.twitch.tv/docs/api/reference/#get-users