Instagram error 24: Media cannot be found (2207006)
Last verified against Meta for Developers - Messenger Platform error codes
The media with {media-id} cannot be foundWhat error 24 means
Code 24 with subcode 2207006 says the Instagram Platform could not resolve the media ID in your request. Meta's recommended solution points away from the media and toward your credentials: it describes the error as a possible permission problem caused by a missing permission or an expired token, and tells you to generate a new container and try again.
In practice the ID can be perfectly real and still unresolvable for the token you sent. A container created with one account's token cannot be seen by another account's token. A token that has lost instagram_business_content_publish (Instagram Login) or instagram_content_publish (Facebook Login) may no longer see containers it created. The same message also appears when the ID simply points at nothing on this account.
Compare this with 2207008, which shares code 24 but is about a container's lifetime rather than visibility. If a fresh container on a freshly validated token still fails, the problem is the account or permission, not timing.
What it looks like
{
"error": {
"type": "OAuthException",
"code": 24,
"error_subcode": 2207006,
"error_user_msg": "The media with 17920238422030506 cannot be found",
"fbtrace_id": "C1wQe8TnUjLs4Zd"
}
}Why it happens
- The access token expired or was revoked between container creation and publish.
- The token is missing the content publishing permission for its login route.
- The container was created under a different Instagram professional account or a different app.
- The media ID was mistyped, truncated, or taken from another environment's database.
How to fix Instagram error 24
- 1Inspect the token with the access token debugger and confirm it is valid and carries the publishing permission for its route.
- 2Confirm the host matches the token:
graph.instagram.comfor Instagram Login tokens,graph.facebook.comfor Facebook Login tokens. - 3Generate a new container with the current token and publish that ID, as Meta recommends.
- 4Ensure the IG_ID used to create the container is the same one used to publish it.
- 5If the token was refreshed, discard containers created under the old token.
How to stop it recurring
Keep one token per Instagram account, tied to the account ID in your database, and use that same pair for container creation and publishing. Refresh long-lived tokens well before expiry and fail loudly on 190 token errors instead of letting a stale token create orphaned containers. Re-check granted scopes after every reconnect, because people can uncheck permissions during login.
Official reference: Meta for Developers - Messenger Platform error codes. See all Instagram error codes or the Instagram limits and quotas.
Related codes
- 24: Media builder does not exist or has expired (2207008)The media builder with creation id = {creation-id} does not exist or has been…
- 190: Invalid OAuth access tokenAccess Token Error: Invalid OAuth access token.
- 10: Application does not have permission for this action(#10) Application does not have permission for this action
- 9007: Media is not ready for publishing (2207027)The media is not ready for publishing, please wait for a moment
Error 24 - quick answers
What does Instagram error 24 mean?
Code 24 with subcode 2207006 says the Instagram Platform could not resolve the media ID in your request. Meta's recommended solution points away from the media and toward your credentials: it describes the error as a possible permission problem caused by a missing permission or an expired token, and tells you to generate a new container and try again.
How do I fix Instagram error 24?
1. Inspect the token with the access token debugger and confirm it is valid and carries the publishing permission for its route. 2. Confirm the host matches the token: graph.instagram.com for Instagram Login tokens, graph.facebook.com for Facebook Login tokens. 3. Generate a new container with the current token and publish that ID, as Meta recommends. 4. Ensure the IG_ID used to create the container is the same one used to publish it. 5. If the token was refreshed, discard…
Stop debugging Instagram by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.