Im trying to check some statistics of a user using their login name. Right now I’m using the requests module in python and this is what my code looks like so far:
user = requests.get(f"https://api.twitch.tv/helix/users?login=emeraldarman/", headers={"client-id":"myclientid", 'Authorization':'Bearer myoauth2'}).json()
print(user)
But this gives me the error {'error': 'Bad Request', 'status': 400, 'message': 'Invalid login names, emails or IDs in request'}
However this is the username I use to log into my Twitch account, am I doing something wrong?
That searches usernames too so a / on the end wouldn’t get good results either. So not sure where you saw that, and if so I wouldn’t expect good results for it.
But it does search name and description
Returns a list of channels (users who have streamed within the past 6 months) that match the query via channel name or description either entirely or partially. Results include both live and offline channels.