Verify if Channel is Live w/ VB.NET

I have a web site that has VB.NET as the code behind where I want to verify if a particular channel is live.

According to the Twitch API documentation:

curl --location --request
GET '' \
--header 'client-id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \
--header 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx'

header 'client-id: Is this my client ID?
header 'Authorization: Does Bearer need to be in there?

I used to have this working, but with the expiration of the old APIs it no longer works:
Dim stringGetInfo As String = New WebClient().DownloadString(“” & stringTwitchID & “&client_id=”)

Could someone be so kind as to provide a VB.NET example for this?

I have tried every which way and Googled, my fingers off but I have not been able to find any good examples and those I have tried always result in 401 errors.

I appreciate any assistance.



The header is

Authorization: Bearer YOURTOKEN

They also both have to be Headers

Also probably not a good use of a the search endpoint, you want the “Get Streams” endpoint.

WebClient headers is covered here