I\'m am looking for the MediaID of an Instagram image which has been uploaded. It should look like
1234567894561231236_33215652
You can use the shortcode media API from instagram. If you use php you can use the following code to get the shortcode from the image's URL:
$matches = [];
preg_match('/instagram\.com\/p\/([^\/]*)/i', $url, $matches);
if (count($matches) > 1) {
$shortcode = $matches[1];
}
Then send a request to the API using your access token (Replace ACCESS-TOKEN with your token)
$apiUrl = sprintf("https://api.instagram.com/v1/media/shortcode/%s?access_token=ACCESS-TOKEN", $shortcode);