For a domestic flight, 45 minutes before takeoff, for an international flight, 3 hours before takeoff.