Instagram API errors · checked against Meta's docs on 10 October 2026
Instagram API error 2207052: Media could not be fetched from this URI
| Code | 9004 |
|---|---|
| Subcode | 2207052 |
| Message | The media could not be fetched from this uri: {uri} |
What it means
Instagram never receives the file from you. When you create a media container with image_url or video_url, Meta's servers download the file from that URL. Error 2207052 means that download failed. Meta's advice is to make sure the URI is valid and publicly available.
Common causes
- The URL needs a login, a cookie or a token header. Meta's fetcher sends none of them.
- The URL points at
localhost, a private IP address or an internal hostname. - A presigned S3, R2 or GCS URL expired before Meta fetched it.
- A firewall, bot protection or hotlink rule blocks the request.
- The server answers with an HTML page (a login, consent or error page) instead of the file.
- The URL contains non-ASCII characters, for example an accented filename. Meta's docs say URLs should use only US-ASCII characters or the request will fail.
How to fix it yourself
Request the URL from a machine outside your network, without cookies:
curl -sI "https://your-host.example/photo.jpg"
You want 200 and a media content type such as image/jpeg or video/mp4. Keep the URL valid until the container status is FINISHED, and rename files to plain ASCII.
How postcache handles it
postcache gives you a public HTTPS URL on cdn.postcache.dev that needs no login, has an ASCII-only filename and is served with the right content type. It stays valid for the time you choose (1 hour to 7 days, 24 hours by default), and you delete it after the post.
curl -X PUT "https://postcache.dev/v1/media" \
-H "Authorization: Bearer $POSTCACHE_API_KEY" \
-H "x-target: instagram.feed" \
--data-binary @photo.jpg
Pass the url from the answer as image_url.
Sources: Meta's Instagram Platform error codes and IG User Media spec. More: all Instagram API media errors · postcache API docs.