Thank you! Made things a lot clearer. Will try and report later.
Thanks again
So I did this:
void fetchPost() async {
http.Response response = await http.get(
‘https://api.twitch.tv/helix/streams?user_login=easywithaces’,headers: {
HttpHeaders.authorizationHeader:
“Client-ID: the_clientId_from_dashboard”},
);
print(response.statusCode);
// 401
print(response.body);
// { “error”:“Unauthorized”,“status”:401,“message”:“Must provide a valid Client-ID or OAuth token”}
}
but still getting 401. It seems like wrong syntax on the ID. Read the documentation and it said
headers: use ‘Client-ID: Key’