houndsworth
houndsworth

Reputation: 23

Instagram API media endpoint "invalid media id"

There is a limit on Instagram API about how much back in time can get information about a media object?

This one works:

https://api.instagram.com/v1/media/shortcode/BU28yxmjEEW?access_token=XXX

This one doesn’t work:

https://api.instagram.com/v1/media/shortcode/BTxHoy2j915?access_token=XXX

I'm getting the following error:

{"meta": {"code": 400, "error_type": "APINotFoundError", "error_message": "invalid media id"}}

The only difference between the two images is the upload date, approx. one month each other.

Thx! :)

Upvotes: 1

Views: 1410

Answers (1)

abiogenesisnow
abiogenesisnow

Reputation: 61

(Cross-posted answer to Instagram API - Getting invalid media id with video shortcode)

I was running into this issue too---the Instagram documentation is not super clear, but this is because of the limitations of Sandbox mode.

To help you develop and test your app, the users and media available in Sandbox mode are real Instagram data (i.e. what is normally visible in the Instagram app), but with the following conditions:

  • Apps in sandbox are restricted to 10 users
  • Data is restricted to the 10 users and the 20 most recent media from each of those users
  • Reduced API rate limits

From https://www.instagram.com/developer/sandbox/.

TLDR you'll need to get your app approved to have your other API calls work.

Upvotes: 1

Related Questions