Hoffs
February 24, 2017, 11:25am
1
Example translating user named Nice
to v5 ID:
https://api.twitch.tv/kraken/users?login=nice
You get:
{
"_total": 1,
"users": [
{
"display_name": "Nice",
"_id": "204416",
"name": "nice",
"type": "user",
"bio": "ChubzyKik: ScaredPsn: Xur \/ Scared",
"created_at": "2007-12-17T21:45:33.839812Z",
"updated_at": "2016-12-09T01:45:44.344078Z",
"logo": "https:\/\/static-cdn.jtvnw.net\/jtv_user_pictures\/nice-profile_image-9e639b1dc2ede357-300x300.jpeg"
}
]
}
But from USERS endpoint you get:
{
"error": "Unprocessable Entity",
"status": 422,
"message": "User \"204416\" is unavailable"
}
So it’s a bit inconsistent and also allows to get users which are banned (?).
Also unrelated but funny, the user Undefined
actually exists and it’s chat is just like you would expect.
Six
February 24, 2017, 6:13pm
2
Are you sure you’re requesting a user using v5 and not v3? I’d check the parameters you’re sending with the request.
3ventic
February 24, 2017, 6:14pm
3
It’s a suspended account and the /users/?login=
shouldn’t be returning its data.
Felk
February 24, 2017, 10:02pm
4
This happens when a user has had a name change. Twitch rewrites the username, but to keep the old username reserved for a while it assigns it to a brand new user account, with a brand new user id, which happens to be automatically suspended and return the above result (422 status code).
Bux0
February 24, 2017, 10:05pm
5
Did not know that. Makes sense though. Thanks for the info.
Felk
February 25, 2017, 3:59pm
6
This seems to be fixed now. https://api.twitch.tv/kraken/users?login=nice
(for any username that no longer exists) returns no results now.
1 Like
system
Closed
March 27, 2017, 3:59pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.