Missing "game" info from new API Calls

Trying to migrate from the old V3 interface to the new V5… but seems some information is missing and actually unattainable.

It seems information such as “Game” is missing.

Using the old API call…

https://api.twitch.tv/kraken/channels/<channel>?client_id=<blah>

Returns a lot more information than the new “equivalent”…

https://api.twitch.tv/helix/users?login=<channel>

Is there anyway to get this missing information?
(Please don’t say the streams api as that only works on ACTIVE streams.)

You’ve misudnerstood v3/v5

Both v3/v5 use https://api.twitch.tv/kraken/ as the base URL, you specify the version via Header

So to migrate you go

https://api.twitch.tv/kraken/channels/<channel_name>?client_id=<blah>

to

https://api.twitch.tv/kraken/channels/<channel_id>?client_id=<blah>

And send a v5 header

So

curl -H 'Accept: application/vnd.twitchtv.v3+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/kraken/channels/dallas

becomes

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/kraken/channels/44322889'

Helix is the “new api” which will succeed V5 when V5 gets turned off.
Helix/new API doesn’t currently provide a way to get current game/title when the stream/channel is not live. So The kraken v5 channels end point is the correct solution

See also Kraken V3 -> Kraken V5 migration guide:

Yeah I meant New rather than V5… Shame as I didn’t want to have to rewrite code again when V5 gets dropped… oh well.

Back to V5 then.

1 Like

Well minimal changes made to the code so that is sends the Accept header and its working still. I guess I will only truly know if its working with v5 when they shut off v3…

I really hope they expand the new API, Seems a bit limited as it is atm.

The expectation is that helix will have “feature parity” with v5 before v5 is removed.

1 Like