Hello everyone
I’m trying to create a GET request that will return the last clip created on a channel in my C# Application, and I’m struggling with it.
I’ve already read basically all the topics created on the matter on the forums, and I’ve realized there is no “latest” query, which is a bummer.
The relevant code to the query is currently:
var httpClient = new HttpClient();
var startDate = DateTime.Today.AddDays(-7).ToRfc3339String();
var endDate = DateTime.Today.ToRfc3339String();
var request = new HttpRequestMessage(HttpMethod.Get, $“https://api.twitch.tv/helix/clips?broadcaster_id={Config.ChannelId}&first=1&started_at{startDate}&ended_at{endDate}”);
request.Headers.Add("Authorization", "Bearer " + accessToken);
request.Headers.Add("Client-Id", clientId);
var response = httpClient.SendAsync(request).Result;
But it only returns the overall top clip on the channel, even though it was created in 2018.
What am I doing wrong?
Thanks in advance, and have a fantastic day!!
Fins