login($credentials->getLogin(), $credentials->getPassword()); // 1518284433 is robertdowneyjr's account id $userId = 1518284433; $follow = $api->unfollow($userId); echo $follow . PHP_EOL; } catch (InstagramException $e) { print_r($e->getMessage()); } catch (CacheException $e) { print_r($e->getMessage()); }