I am getting the instagram images from instagram API. (endpoint : https://api.instagram.com/v1/users/self/media/recent?access_token= ). Then I am saving the image URLs that returning from the API call in the database and use them in the front-end. Exmple image url is below.
Example URL : https://scontent.cdninstagram.com/vp/xxx/xxx/xx/s150x150/xxx/x.x.x.x/xxxx_n.jpg
But sometimes the images doesn't show and when I go to the image particular link it shows 'URL signature expired'. What would be the reason for that?
I have referred the question about the same in a previous post in stack overflow and it didn't help. It said to save the image in a separate server. It won't work for me.
Instagram CDN URLs contain timestamp components that allow them to expire after a while. If you need the image to persist, you'll have to save it somewhere and serve that instead.
You can visit https://www.instagram.com/p/CQX8lKutaZU/media/?size=l
Use; "l" parameter for large,
"m" parameter for medium,
"t" parameter for small pictures.
But sadly it doesn't work on videos (it just shows thumbnails)
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