"started_at" parameter doesn't seem to do anything for get clips

When include the started_at param, i still get the same clips. Even though I have it set for march 18th, I’m still getting clips from like years ago.

this is what I’ve been trying, is the time format wrong? I just copied the format from what i’ve seen from other examples.

headers = {'Client-ID':client_id, 'Authorization': 'Bearer ' + token, 'started_at':'2022-03-18T00:00:00.123Z'}

response = r.get ('https://api.twitch.tv/helix/clips?broadcaster_id=36340781', headers = headers)

info = loads (response.text)

for i in info ['data']:

    print (i['created_at'])```

You specified the started_at as a header.

It’s a query parameter

headers = {'Client-ID':client_id, 'Authorization': 'Bearer ' + token, 'started_at':'2022-03-18T00:00:00.123Z'}

response = r.get ('https://api.twitch.tv/helix/clips?broadcaster_id=36340781', headers = headers)

Should be

headers = {'Client-ID':client_id, 'Authorization': 'Bearer ' + token}

response = r.get ('https://api.twitch.tv/helix/clips?broadcaster_id=36340781&started_at=2022-03-18T00:00:00.123Z', headers = headers)

Snippet using the CLI

$ twitch api get 'clips?broadcaster_id=36340781&started_at=2022-03-18T00:00:00.123Z'
{
  "data": [
    {
      "broadcaster_id": "36340781",
      "broadcaster_name": "tarik",
      "created_at": "2022-03-18T07:18:39Z",
      "creator_id": "51324077",
      "creator_name": "lamchops2000",
      "duration": 27.9,
      "embed_url": "https://clips.twitch.tv/embed?clip=KindFriendlyKaleSuperVinlin-6HP-jBckuIL34dog",
      "game_id": "516575",
      "id": "KindFriendlyKaleSuperVinlin-6HP-jBckuIL34dog",
      "language": "en",
      "thumbnail_url": "https://clips-media-assets2.twitch.tv/AT-cm%7CnYghsuhz_owXJLiC9-HaIA-preview-480x272.jpg",
      "title": "disgusting ace",
      "url": "https://clips.twitch.tv/KindFriendlyKaleSuperVinlin-6HP-jBckuIL34dog",
      "video_id": "1428580279",
      "view_count": 25357
    },
    {
      "broadcaster_id": "36340781",
      "broadcaster_name": "tarik",
      "created_at": "2022-03-20T09:11:23Z",
      "creator_id": "32365635",
      "creator_name": "卡依撈劇",
      "duration": 53.6,
      "embed_url": "https://clips.twitch.tv/embed?clip=EnjoyableMushyBarracudaDoubleRainbow-LVPDpvJEkOTRP8Sd",
      "game_id": "516575",
      "id": "EnjoyableMushyBarracudaDoubleRainbow-LVPDpvJEkOTRP8Sd",
      "language": "en",
      "thumbnail_url": "https://clips-media-assets2.twitch.tv/AT-cm%7C7H2JUC1Tw6byRJDk0T_EnQ-preview-480x272.jpg",
      "title": "tarik",
      "url": "https://clips.twitch.tv/EnjoyableMushyBarracudaDoubleRainbow-LVPDpvJEkOTRP8Sd",
      "video_id": "1430643656",
      "view_count": 3557
    },

1 Like

ooh, that went over my head. Thank you for the help

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