Get a stream title when it's offline?

Hi !
Is there possible to get the stream title when this one is offline ?

Because when i do :

" $json_array['stream']['channel']['status'] "

it return a blank page, because the stream is offline.

But when the stream is online, it return the stream title.

Thank you very much ! :grin:

Use the channels endpoint for a streamer that is offline.

$json_array[‘channels’][‘status’] "

Thanks for the answer,

But when i do
echo $json_array['channels']['status'];
it say : Notice: Undefined index: channels

Can you help me ?
Thank you ! :slightly_smiling_face:

Which API are you using?

I’m using the API Kraken
I decode the link “https://api.twitch.tv/kraken/streams/user/client_id

I dont know if it’s the real API’s name, i’m a beginner ^^

Thanks

Assuming Kraken v5

(Ex: Channel ID 23161357 for Lirik) :

https://api.twitch.tv/kraken/channels/23161357?client_id=xxxxxx
$json_array['status']
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.