Instagram Reels Downloader

Download Instagram Reels Video online to your device.

$appId, 'client_secret' => $appSecret, 'grant_type' => 'authorization_code', 'redirect_uri' => $redirectUri, 'code' => $code, ])); $response = curl_exec($ch); $shortLived = json_decode($response, true); curl_close($ch); if (!isset($shortLived['access_token'])) { die('Token exchange failed: ' . $response); } // Step 3: Exchange short-lived token for a long-lived one (~60 days) $longLivedUrl = 'https://graph.instagram.com/access_token?' . http_build_query([ 'grant_type' => 'ig_exchange_token', 'client_secret' => $appSecret, 'access_token' => $shortLived['access_token'], ]); $ch = curl_init($longLivedUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $longLived = json_decode($response, true); curl_close($ch); if (!isset($longLived['access_token'])) { die('Long-lived token exchange failed: ' . $response); } // Step 4: Store $longLived['access_token'] + $longLived['expires_in'] // securely (encrypted at rest), tied to the logged-in user's account. echo "Success. Long-lived token acquired, valid for " . $longLived['expires_in'] . " seconds.";