Did you use the correct mediaID/mediaType for reels and videos?
I'll share my own basic CLI for posting images and videos to Instagram, and you can see how the use the media type correctly.
You can check the code snippet.
func createMediaContainer() (string, error) {
endpoint := fmt.Sprintf("https://graph.instagram.com/%s/%s/media", config.Version, config.IGID)
data := url.Values{}
if mediaType == "video" {
data.Set("media_type", "REELS")
data.Set("video_url", mediaURL)
} else {
data.Set("image_url", mediaURL)
}
data.Set("caption", caption)
data.Set("access_token", config.Token)
resp, err := http.PostForm(endpoint, data)
if err != nil {
return "", err
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
if resp.StatusCode != 200 {
return "", fmt.Errorf("API error: %s", string(body))
}
return parseID(body), nil
}