Hm, from what you’re posting, it all looks good and i can’t reproduce any 404 on the URL you posted.
Without seeing any further code (Feel free to share it!) I would have to blindly guess that you may be accidentally trying to call https://api.twitch.tv/helix/user instead of https://api.twitch.tv/helix/users - which would result in a 404.