I'm trying to use https://www.instagram.com/developer/endpoints/media/, but for every media id that I use I get always the same result :
{
"meta": {
"error_type": "APINotFoundError",
"code": 400,
"error_message": "invalid media id"
}
}
I'm getting the media id from another api service, for example:
https://api.instagram.com/oembed?url=http://instagr.am/p/fA9uwTtkSN/.
So in the response we can see ``"media_id":"558717847597368461_9538472"`, then I use that id in media endpoint and i get "invalid media id".
I was wondering if the api is having some problems or maybe I missing something.
I guess you are using a valid access token!
The app you are using, is it in Sandbox mode or live? Instagram has recently changed the API endpoints. If your app is in Sandbox mode, only Sandbox user's media can be accessed.
If none of the above applies, contact Instagram! They can only help you.
Hope it helps!
You are maybe getting that error because the user that posted the media is a private user. That was my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With