Instagram has added URL signatures to its media URLs.
You can easily remove the URL signature with this regular expression: "vp. * /. {32} /. {8} /"
For example in PHP:
preg_replace('/vp.*\/.{32}\/.{8}\//', '', $mediaUrl)
On the other hand, I donβt think that removing the URL signature is the best solution (this is just a quick fix). Good to call the Instagram API again to get a new URL.
UPDATE
It seems like Instagram is currently checking the signature of the URL and returns a 403 "Access denied" error if the signature is missing, so now the only solution is to call the Instagram API again to get the new multimedia URL.
UPDATE April 2018
Instagram has closed its endpoint βapi.instagram.com/v1/media/β, so itβs currently not possible to update the post URLs.
A possible solution is to upload media files and store them on your own servers (I do not recommend this solution because it violates the terms of the Instagram API, so do it at your own peril and risk).
Another solution is to call the origin endpoint again where you found the funds again (but it is currently difficult to manage calls with a new API speed limit).
You can also find some unofficial Instagram APIs on github that may help you.
Jordi
source share