Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Instagram OAuth proxy
// Registered Instagram redirect URI:
// Custom YOUR_APP_CALLBACK redirect URI:
// receive OAuth code parameter
$code = $_GET['code'];
$redirectHost = $_GET['redirect'];
$instagramEndpoint = $redirectHost . "/success.php?code=" . $code;
// authentication failed -> redirect to login
header('Location: ' . $instagramEndpoint);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.